move season zero display name to per library settings

This commit is contained in:
Luke Pulverenti
2017-09-24 16:23:56 -04:00
parent f29598283c
commit de5a8d579b
7 changed files with 13 additions and 68 deletions

View File

@@ -113,7 +113,7 @@ namespace MediaBrowser.Providers.TV
CancellationToken cancellationToken)
{
var seasonName = seasonNumber == 0 ?
_config.Configuration.SeasonZeroDisplayName :
_libraryManager.GetLibraryOptions(series).SeasonZeroDisplayName :
(seasonNumber.HasValue ? string.Format(_localization.GetLocalizedString("NameSeasonNumber"), seasonNumber.Value.ToString(_usCulture)) : _localization.GetLocalizedString("NameSeasonUnknown"));
_logger.Info("Creating Season {0} entry for {1}", seasonName, series.Name);

View File

@@ -8,9 +8,7 @@ using MediaBrowser.Providers.Manager;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using MediaBrowser.Controller.Entities;
using MediaBrowser.Controller.IO;
using MediaBrowser.Model.IO;
namespace MediaBrowser.Providers.TV
@@ -23,9 +21,11 @@ namespace MediaBrowser.Providers.TV
if (item.IndexNumber.HasValue && item.IndexNumber.Value == 0)
{
if (!string.Equals(item.Name, ServerConfigurationManager.Configuration.SeasonZeroDisplayName, StringComparison.OrdinalIgnoreCase))
var seasonZeroDisplayName = LibraryManager.GetLibraryOptions(item).SeasonZeroDisplayName;
if (!string.Equals(item.Name, seasonZeroDisplayName, StringComparison.OrdinalIgnoreCase))
{
item.Name = ServerConfigurationManager.Configuration.SeasonZeroDisplayName;
item.Name = seasonZeroDisplayName;
updateType = updateType | ItemUpdateType.MetadataEdit;
}
}