aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArne Morten Kvarving <spiff@xbmc.org>2013-07-08 08:43:47 -0700
committerArne Morten Kvarving <spiff@xbmc.org>2013-07-08 08:43:47 -0700
commit4b08a6457dc6452dccba3bbcc0abd61ae9a5762d (patch)
tree8fcc05931c98df1b745478bcf8c1eeb497c6e8f5
parentdc8d00367b3751353a63d33f9ae814ab9b6ba8b9 (diff)
parent5d0a37b907f260a0d3084cbf733b3622049d24a8 (diff)
Merge pull request #2935 from ScudLee/missingsubepisodefix
[VideoInfoScanner] If no matching subepisode in guide, try full episode
-rw-r--r--xbmc/video/VideoInfoScanner.cpp15
1 files changed, 12 insertions, 3 deletions
diff --git a/xbmc/video/VideoInfoScanner.cpp b/xbmc/video/VideoInfoScanner.cpp
index ad8cd8cb0c..8bb28da022 100644
--- a/xbmc/video/VideoInfoScanner.cpp
+++ b/xbmc/video/VideoInfoScanner.cpp
@@ -1393,16 +1393,25 @@ namespace VIDEO
}
EPISODE key(file->iSeason, file->iEpisode, file->iSubepisode);
+ EPISODE backupkey(file->iSeason, file->iEpisode, 0);
bool bFound = false;
EPISODELIST::iterator guide = episodes.begin();;
EPISODELIST matches;
for (; guide != episodes.end(); ++guide )
{
- if ((file->iEpisode!=-1) && (file->iSeason!=-1) && (key==*guide))
+ if ((file->iEpisode!=-1) && (file->iSeason!=-1))
{
- bFound = true;
- break;
+ if (key==*guide)
+ {
+ bFound = true;
+ break;
+ }
+ else if ((file->iSubepisode!=0) && (backupkey==*guide))
+ {
+ matches.push_back(*guide);
+ continue;
+ }
}
if (file->cDate.IsValid() && guide->cDate.IsValid() && file->cDate==guide->cDate)
{