Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

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
@MartijnKaijser MartijnKaijser authored
Showing with 6 additions and 3 deletions.
  1. +6 −3 xbmc/video/VideoInfoScanner.cpp
View
9 xbmc/video/VideoInfoScanner.cpp
@@ -1351,9 +1351,12 @@ namespace VIDEO
if (result == CNfoFile::FULL_NFO)
{
m_nfoReader.GetDetails(*item.GetVideoInfoTag());
- // override with episode and season number
- item.GetVideoInfoTag()->m_iEpisode = file->iEpisode;
- item.GetVideoInfoTag()->m_iSeason = file->iSeason;
+ // override with episode and season number from file if available
+ if (file->iEpisode > -1)
+ {
+ item.GetVideoInfoTag()->m_iEpisode = file->iEpisode;
+ item.GetVideoInfoTag()->m_iSeason = file->iSeason;
+ }
if (AddVideo(&item, CONTENT_TVSHOWS, file->isFolder, true, &showInfo) < 0)
return INFO_ERROR;
continue;
Please sign in to comment.
Something went wrong with that request. Please try again.