Skip to content
This repository
Browse code

Merge pull request #2590 from ScudLee/Date-based_Nfo_fix

Only override episode/season numbers if the file name has them
  • Loading branch information...
commit 2357c015aceec6481e84d9eaf741a899205bd7ee 2 parents 9ad1743 + 2ae1f0b
Martijn Kaijser authored April 11, 2013

Showing 1 changed file with 6 additions and 3 deletions. Show diff stats Hide diff stats

  1. 9  xbmc/video/VideoInfoScanner.cpp
9  xbmc/video/VideoInfoScanner.cpp
@@ -1351,9 +1351,12 @@ namespace VIDEO
1351 1351
       if (result == CNfoFile::FULL_NFO)
1352 1352
       {
1353 1353
         m_nfoReader.GetDetails(*item.GetVideoInfoTag());
1354  
-        // override with episode and season number
1355  
-        item.GetVideoInfoTag()->m_iEpisode = file->iEpisode;
1356  
-        item.GetVideoInfoTag()->m_iSeason = file->iSeason;
  1354
+        // override with episode and season number from file if available
  1355
+        if (file->iEpisode > -1)
  1356
+        {
  1357
+          item.GetVideoInfoTag()->m_iEpisode = file->iEpisode;
  1358
+          item.GetVideoInfoTag()->m_iSeason = file->iSeason;
  1359
+        }
1357 1360
         if (AddVideo(&item, CONTENT_TVSHOWS, file->isFolder, true, &showInfo) < 0)
1358 1361
           return INFO_ERROR;
1359 1362
         continue;

0 notes on commit 2357c01

Please sign in to comment.
Something went wrong with that request. Please try again.