mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-06-18 13:40:45 +01:00
move season zero display name to per library settings
This commit is contained in:
@@ -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);
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user