mirror of
https://github.com/jellyfin/jellyfin.git
synced 2024-09-06 19:37:55 +02:00
Merge pull request #1576 from softworkz/TvDbProviderFix
TheTVDB Episode Provider: Fixed incorrect fallback to absolute episode numbering
This commit is contained in:
commit
ce65615e55
1 changed files with 23 additions and 23 deletions
|
@ -259,36 +259,36 @@ namespace MediaBrowser.Providers.TV
|
||||||
return files;
|
return files;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (seasonNumber == null)
|
|
||||||
{
|
|
||||||
return files;
|
|
||||||
}
|
|
||||||
|
|
||||||
var file = Path.Combine(seriesDataPath, string.Format("episode-{0}-{1}.xml", seasonNumber.Value, episodeNumber));
|
|
||||||
|
|
||||||
var fileInfo = _fileSystem.GetFileInfo(file);
|
|
||||||
var usingAbsoluteData = false;
|
var usingAbsoluteData = false;
|
||||||
|
|
||||||
if (fileInfo.Exists)
|
if (seasonNumber.HasValue)
|
||||||
{
|
{
|
||||||
files.Add(fileInfo);
|
var file = Path.Combine(seriesDataPath, string.Format("episode-{0}-{1}.xml", seasonNumber.Value, episodeNumber));
|
||||||
}
|
var fileInfo = _fileSystem.GetFileInfo(file);
|
||||||
else
|
|
||||||
{
|
if (fileInfo.Exists)
|
||||||
file = Path.Combine(seriesDataPath, string.Format("episode-abs-{0}.xml", episodeNumber));
|
{
|
||||||
fileInfo = _fileSystem.GetFileInfo(file);
|
files.Add(fileInfo);
|
||||||
if (fileInfo.Exists)
|
}
|
||||||
{
|
}
|
||||||
files.Add(fileInfo);
|
else
|
||||||
usingAbsoluteData = true;
|
{
|
||||||
}
|
usingAbsoluteData = true;
|
||||||
}
|
var file = Path.Combine(seriesDataPath, string.Format("episode-abs-{0}.xml", episodeNumber));
|
||||||
|
var fileInfo = _fileSystem.GetFileInfo(file);
|
||||||
|
if (fileInfo.Exists)
|
||||||
|
{
|
||||||
|
files.Add(fileInfo);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
var end = endingEpisodeNumber ?? episodeNumber;
|
var end = endingEpisodeNumber ?? episodeNumber;
|
||||||
episodeNumber++;
|
episodeNumber++;
|
||||||
|
|
||||||
while (episodeNumber <= end)
|
while (episodeNumber <= end)
|
||||||
{
|
{
|
||||||
|
string file;
|
||||||
|
|
||||||
if (usingAbsoluteData)
|
if (usingAbsoluteData)
|
||||||
{
|
{
|
||||||
file = Path.Combine(seriesDataPath, string.Format("episode-abs-{0}.xml", episodeNumber));
|
file = Path.Combine(seriesDataPath, string.Format("episode-abs-{0}.xml", episodeNumber));
|
||||||
|
@ -298,7 +298,7 @@ namespace MediaBrowser.Providers.TV
|
||||||
file = Path.Combine(seriesDataPath, string.Format("episode-{0}-{1}.xml", seasonNumber.Value, episodeNumber));
|
file = Path.Combine(seriesDataPath, string.Format("episode-{0}-{1}.xml", seasonNumber.Value, episodeNumber));
|
||||||
}
|
}
|
||||||
|
|
||||||
fileInfo = _fileSystem.GetFileInfo(file);
|
var fileInfo = _fileSystem.GetFileInfo(file);
|
||||||
if (fileInfo.Exists)
|
if (fileInfo.Exists)
|
||||||
{
|
{
|
||||||
files.Add(fileInfo);
|
files.Add(fileInfo);
|
||||||
|
|
Loading…
Reference in a new issue