From 77af58e506bc26ee63accc899726dc9c47182a37 Mon Sep 17 00:00:00 2001 From: Mario Di Raimondo Date: Mon, 15 Sep 2014 01:55:35 +0200 Subject: [PATCH] generalized some patterns and added new cases signaled by @stan86 --- src/epggrab/module/opentv.c | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/src/epggrab/module/opentv.c b/src/epggrab/module/opentv.c index 31e849dd..d4ff971f 100644 --- a/src/epggrab/module/opentv.c +++ b/src/epggrab/module/opentv.c @@ -164,15 +164,18 @@ static epggrab_channel_t *_opentv_find_epggrab_channel /* Patterns for the extraction of season/episode numbers from summary of events*/ static const char *_opentv_se_num_patterns[] = { - " *\\(S ?([0-9]+),? Ep? ?([0-9]+)\\)", /* for ??? */ - " *([0-9]+)'? Stagione +Ep\\. ?([0-9]+)([a-z]?) ?-", /* for Sky IT, ex.: 4' Stagione Ep.9B - ... */ - " *([0-9]+)'? Stagione() ?-", /* for Sky IT, ex.: 4' Stagione - ... */ - "() *Ep\\. ?([0-9]+)([a-z]?) ?-" }; /* for Sky IT, ex.: Ep.9A - ... */ + " *\\(S ?([0-9]+),? Ep? ?([0-9]+)\\)", /* for ??? */ + "^ *([0-9]+)'? Stagione +Ep\\. ?([0-9]+)([a-z]?)", /* for Sky IT, ex.: 4' Stagione Ep.9B ... */ + "^ *([0-9]+)'? Stagione()", /* for Sky IT, ex.: 4' Stagione ... */ + "^() *Ep\\. ?([0-9]+)([a-z]?)", /* for Sky IT, ex.: Ep.9A ... */ + "^ *([0-9]+)a? Stagione -? ?Puntata ?([0-9]+)", /* for Sky IT, ex.: 3a Stagione - Puntata 1 ... */ + "^() *Puntata ?([0-9]+)" }; /* for Sky IT, ex.: Puntata 5 ... */ static regex_t *_opentv_se_num_pregs; /* Patterns for the extraction of subtitles from summary of events*/ static const char *_opentv_subtitle_patterns[] = { - "^[^-]+- '(([^']*(' [^A-Z0-9])?('[^ ])?)+)' " }; /* for Sky IT, ex.: 1' Stagione Ep.7 - 'L'Hub' Gli agenti ...: sara' Ward ... */ + "^ *[0-9]+'? Stagione +Ep\\. ?[0-9]+[A-Za-z]? -? ?'(([^']*(' [^A-Z0-9])?('[^ ])?)+)'", /* for Sky IT, ex.: 1' Stagione Ep.7 - 'L'Hub' Gli agenti ...: sara' Ward ... // 4' Stagione Ep.9 'Title' ... */ + "^ *Ep\\. ?[0-9]+[A-Za-z]? -? ?'(([^']*(' [^A-Z0-9])?('[^ ])?)+)'"}; /* for Sky IT, ex.: Ep.4 - 'Title' ... */ static regex_t *_opentv_subtitle_pregs; /* Parse huffman encoded string */