summaryrefslogtreecommitdiff
path: root/parse.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'parse.cpp')
-rw-r--r--parse.cpp19
1 files changed, 16 insertions, 3 deletions
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);