From e6201c4aed1d397df6e27253f7fba0fb99776ef3 Mon Sep 17 00:00:00 2001 From: Jochen Dolze Date: Tue, 12 Jun 2012 20:22:21 +0200 Subject: Fixed adding description bug --- import.cpp | 4 +++- parse.cpp | 19 ++++++++++++++++--- setup.cpp | 11 ++++------- 3 files changed, 23 insertions(+), 11 deletions(-) diff --git a/import.cpp b/import.cpp index 2b46578..6ebf0d1 100644 --- a/import.cpp +++ b/import.cpp @@ -390,15 +390,17 @@ char *cImport::Add2Description(char *description, cXMLTVEvent *xEvent, int Flags { if (what==USE_LONGTEXT) { + bool lta=false; if (((Flags & USE_LONGTEXT)==USE_LONGTEXT) || ((Flags & OPT_APPEND)==OPT_APPEND)) { if (xEvent->Description() && (strlen(xEvent->Description())>0)) { description=Add2Description(description,xEvent->Description()); + lta=true; } } - if (!description && xEvent->EITDescription() && (strlen(xEvent->EITDescription())>0)) + if (!lta && xEvent->EITDescription() && (strlen(xEvent->EITDescription())>0)) { description=Add2Description(description,xEvent->EITDescription()); } diff --git a/parse.cpp b/parse.cpp index 54c950f..45f584b 100644 --- a/parse.cpp +++ b/parse.cpp @@ -183,10 +183,23 @@ bool cParse::FetchSeasonEpisode(iconv_t cEP2ASCII, iconv_t cUTF2ASCII, const cha if (dirent->d_name[0]=='.') continue; char *pt=strrchr(dirent->d_name,'.'); if (pt) *pt=0; - if (!strncasecmp(dirent->d_name,Title,strlen(dirent->d_name))) + int dlen=strlen(dirent->d_name); + if (!strncasecmp(dirent->d_name,Title,dlen)) { - found=true; - break; + int tlen=strlen(Title); + if (tlen>dlen) + { + if (Title[dlen+1]==32) + { + found=true; + break; + } + } + else + { + found=true; + break; + } } } closedir(dir); diff --git a/setup.cpp b/setup.cpp index 1cd9698..13eb62d 100644 --- a/setup.cpp +++ b/setup.cpp @@ -1110,14 +1110,11 @@ void cMenuSetupXmltv2vdrChannelMap::output(void) Add(new cMyMenuEditBitItem(tr("video"),&flags,USE_VIDEO),true); Add(new cMyMenuEditBitItem(tr("audio"),&flags,USE_AUDIO),true); - if (g->EPDir()) + Add(new cMyMenuEditBitItem(tr("season and episode"),&flags,USE_SEASON),true); + c4=Current(); + if (((flags & USE_SEASON)==USE_SEASON) && (g->EPDir())) { - Add(new cMyMenuEditBitItem(tr("season and episode"),&flags,USE_SEASON),true); - c4=Current(); - if ((flags & USE_SEASON)==USE_SEASON) - { - Add(new cMyMenuEditBitItem(tr(" add shorttext from list"),&flags,OPT_SEASON_SHORTTEXT),true); - } + Add(new cMyMenuEditBitItem(tr(" add shorttext from list"),&flags,OPT_SEASON_SHORTTEXT),true); } hasmaps=false; -- cgit v1.2.3