< Summary - Jellyfin

Information
Class: MediaBrowser.Providers.TV.SeriesMetadataService
Assembly: MediaBrowser.Providers
File(s): /srv/git/jellyfin/MediaBrowser.Providers/TV/SeriesMetadataService.cs
Line coverage
8%
Covered lines: 17
Uncovered lines: 176
Coverable lines: 193
Total lines: 480
Line coverage: 8.8%
Branch coverage
14%
Covered branches: 18
Total branches: 128
Branch coverage: 14%
Method coverage

Feature is only available for sponsors

Upgrade to PRO version

Coverage history

Coverage history 0 25 50 75 100 5/31/2026 - 12:15:44 AM Line coverage: 2.2% (3/134) Branch coverage: 0% (0/74) Total lines: 3226/4/2026 - 12:15:59 AM Line coverage: 2.2% (3/135) Branch coverage: 0% (0/76) Total lines: 3256/14/2026 - 12:16:28 AM Line coverage: 2% (3/144) Branch coverage: 0% (0/82) Total lines: 3447/6/2026 - 12:16:28 AM Line coverage: 1.7% (3/173) Branch coverage: 0% (0/108) Total lines: 42810/29/2026 - 12:17:11 AM Line coverage: 8.8% (17/193) Branch coverage: 14% (18/128) Total lines: 480 5/31/2026 - 12:15:44 AM Line coverage: 2.2% (3/134) Branch coverage: 0% (0/74) Total lines: 3226/4/2026 - 12:15:59 AM Line coverage: 2.2% (3/135) Branch coverage: 0% (0/76) Total lines: 3256/14/2026 - 12:16:28 AM Line coverage: 2% (3/144) Branch coverage: 0% (0/82) Total lines: 3447/6/2026 - 12:16:28 AM Line coverage: 1.7% (3/173) Branch coverage: 0% (0/108) Total lines: 42810/29/2026 - 12:17:11 AM Line coverage: 8.8% (17/193) Branch coverage: 14% (18/128) Total lines: 480

Coverage delta

Coverage delta 14 -14

Metrics

MethodBranch coverage Crap Score Cyclomatic complexity Line coverage
.ctor(...)100%11100%
RefreshMetadata()0%7280%
AfterMetadataRefresh()0%620%
UpdateSeriesChildrenInfoAsync()0%420200%
MergeData(...)0%210140%
RemoveObsoleteSeasons(...)0%272160%
GetPresentEpisodeIds(...)100%1212100%
IsAlreadyPresent(...)100%66100%
IdentityKey(...)100%11100%
RemoveObsoleteEpisodes(...)0%272160%
DeleteEpisode(...)100%210%
NeedsVirtualSeason(...)0%110100%
CreateSeasonsAsync()0%342180%
CreateSeasonAsync()100%210%
GetValidSeasonNameForSeries(...)0%4260%

File(s)

/srv/git/jellyfin/MediaBrowser.Providers/TV/SeriesMetadataService.cs

#LineLine coverage
 1using System;
 2using System.Collections.Generic;
 3using System.Globalization;
 4using System.Linq;
 5using System.Threading;
 6using System.Threading.Tasks;
 7using Jellyfin.Extensions;
 8using MediaBrowser.Controller.Configuration;
 9using MediaBrowser.Controller.Dto;
 10using MediaBrowser.Controller.Entities;
 11using MediaBrowser.Controller.Entities.TV;
 12using MediaBrowser.Controller.IO;
 13using MediaBrowser.Controller.Library;
 14using MediaBrowser.Controller.Persistence;
 15using MediaBrowser.Controller.Providers;
 16using MediaBrowser.Model.Entities;
 17using MediaBrowser.Model.Globalization;
 18using MediaBrowser.Model.IO;
 19using MediaBrowser.Providers.Manager;
 20using Microsoft.Extensions.Logging;
 21
 22namespace MediaBrowser.Providers.TV;
 23
 24/// <summary>
 25/// Service to manage series metadata.
 26/// </summary>
 27public class SeriesMetadataService : MetadataService<Series, SeriesInfo>
 28{
 29    private readonly ILocalizationManager _localizationManager;
 30
 31    /// <summary>
 32    /// Initializes a new instance of the <see cref="SeriesMetadataService"/> class.
 33    /// </summary>
 34    /// <param name="serverConfigurationManager">Instance of the <see cref="IServerConfigurationManager"/>.</param>
 35    /// <param name="logger">Instance of the <see cref="ILogger"/> interface.</param>
 36    /// <param name="providerManager">Instance of the <see cref="IProviderManager"/> interface.</param>
 37    /// <param name="fileSystem">Instance of the <see cref="IFileSystem"/> interface.</param>
 38    /// <param name="libraryManager">Instance of the <see cref="ILibraryManager"/> interface.</param>
 39    /// <param name="localizationManager">Instance of the <see cref="ILocalizationManager"/> interface.</param>
 40    /// <param name="externalDataManager">Instance of the <see cref="IExternalDataManager"/> interface.</param>
 41    /// <param name="itemRepository">Instance of the <see cref="IItemRepository"/> interface.</param>
 42    public SeriesMetadataService(
 43        IServerConfigurationManager serverConfigurationManager,
 44        ILogger<SeriesMetadataService> logger,
 45        IProviderManager providerManager,
 46        IFileSystem fileSystem,
 47        ILibraryManager libraryManager,
 48        ILocalizationManager localizationManager,
 49        IExternalDataManager externalDataManager,
 50        IItemRepository itemRepository)
 2751        : base(serverConfigurationManager, logger, providerManager, fileSystem, libraryManager, externalDataManager, ite
 52    {
 2753        _localizationManager = localizationManager;
 2754    }
 55
 56    /// <inheritdoc />
 57    public override async Task<ItemUpdateType> RefreshMetadata(BaseItem item, MetadataRefreshOptions refreshOptions, Can
 58    {
 059        if (item is Series series)
 60        {
 061            var seasons = series.GetRecursiveChildren(i => i is Season).ToList();
 62
 063            foreach (var season in seasons)
 64            {
 065                var hasUpdate = refreshOptions is not null && season.BeforeMetadataRefresh(refreshOptions.ReplaceAllMeta
 066                if (hasUpdate)
 67                {
 068                    await season.UpdateToRepositoryAsync(ItemUpdateType.MetadataEdit, cancellationToken).ConfigureAwait(
 69                }
 70            }
 71        }
 72
 073        return await base.RefreshMetadata(item, refreshOptions, cancellationToken).ConfigureAwait(false);
 074    }
 75
 76    /// <inheritdoc />
 77    protected override async Task AfterMetadataRefresh(Series item, MetadataRefreshOptions refreshOptions, CancellationT
 78    {
 079        await base.AfterMetadataRefresh(item, refreshOptions, cancellationToken).ConfigureAwait(false);
 80
 81        // Note that this only updates the children's SeriesPresentationUniqueKey and SeasonId, not the ParentIndexNumbe
 082        if (LibraryManager.GetLibraryOptions(item).EnableAutomaticSeriesGrouping)
 83        {
 084            await UpdateSeriesChildrenInfoAsync(item, cancellationToken).ConfigureAwait(false);
 85        }
 86
 087        RemoveObsoleteEpisodes(item);
 088        RemoveObsoleteSeasons(item);
 089        await CreateSeasonsAsync(item, cancellationToken).ConfigureAwait(false);
 090    }
 91
 92    /// <summary>
 93    /// Reconciles seasons and episodes with the series' finalized state.
 94    /// </summary>
 95    /// <remarks>
 96    /// The series' presentation unique key can change during a refresh once provider ids become
 97    /// available - notably with <c>EnableAutomaticSeriesGrouping</c>, where the key is derived from
 98    /// the provider id and the owning libraries instead of the (immutable) item id. Seasons and
 99    /// episodes cache this value in <see cref="IHasSeries.SeriesPresentationUniqueKey"/> and are
 100    /// matched to (and displayed under) the series by it, so any child left with a stale key - or an
 101    /// episode not yet linked to a freshly created season - stays hidden until a later scan. Syncing
 102    /// them against the series here lets everything appear within a single scan.
 103    /// </remarks>
 104    /// <param name="series">The series.</param>
 105    /// <param name="cancellationToken">The cancellation token.</param>
 106    /// <returns>The async task.</returns>
 107    private async Task UpdateSeriesChildrenInfoAsync(Series series, CancellationToken cancellationToken)
 108    {
 109        // Reload children so episode numbers / seasons persisted earlier in the refresh are seen.
 0110        series.Children = null;
 0111        var seriesKey = series.GetPresentationUniqueKey();
 0112        var children = series.GetRecursiveChildren(i => i is Season || i is Episode);
 0113        var seasons = children.OfType<Season>().ToList();
 114
 0115        foreach (var child in children)
 116        {
 0117            var updateType = ItemUpdateType.None;
 118
 0119            if (child is IHasSeries hasSeries
 0120                && !string.Equals(hasSeries.SeriesPresentationUniqueKey, seriesKey, StringComparison.Ordinal))
 121            {
 0122                hasSeries.SeriesPresentationUniqueKey = seriesKey;
 0123                updateType |= ItemUpdateType.MetadataImport;
 124            }
 125
 0126            if (child is Episode episode)
 127            {
 0128                var seasonId = episode.FindSeasonId();
 0129                if (seasonId.IsEmpty() && episode.ParentIndexNumber.HasValue)
 130                {
 0131                    seasonId = seasons.Find(s => s.IndexNumber == episode.ParentIndexNumber)?.Id ?? Guid.Empty;
 132                }
 133
 0134                if (!seasonId.IsEmpty() && !episode.SeasonId.Equals(seasonId))
 135                {
 0136                    episode.SeasonId = seasonId;
 0137                    updateType |= ItemUpdateType.MetadataImport;
 138                }
 139            }
 140
 0141            if (updateType > ItemUpdateType.None)
 142            {
 0143                await child.UpdateToRepositoryAsync(updateType, cancellationToken).ConfigureAwait(false);
 144            }
 145        }
 0146    }
 147
 148    /// <inheritdoc />
 149    protected override void MergeData(MetadataResult<Series> source, MetadataResult<Series> target, MetadataField[] lock
 150    {
 0151        base.MergeData(source, target, lockedFields, replaceData, mergeMetadataSettings);
 152
 0153        var sourceItem = source.Item;
 0154        var targetItem = target.Item;
 155
 0156        if (replaceData || string.IsNullOrEmpty(targetItem.AirTime))
 157        {
 0158            targetItem.AirTime = sourceItem.AirTime;
 159        }
 160
 0161        if (replaceData || !targetItem.Status.HasValue)
 162        {
 0163            targetItem.Status = sourceItem.Status;
 164        }
 165
 0166        if (replaceData || targetItem.AirDays is null || targetItem.AirDays.Length == 0)
 167        {
 0168            targetItem.AirDays = sourceItem.AirDays;
 169        }
 0170    }
 171
 172    private void RemoveObsoleteSeasons(Series series)
 173    {
 174        // TODO Legacy. It's not really "physical" seasons as any virtual seasons are always converted to non-virtual in
 0175        var physicalSeasonNumbers = new HashSet<int>();
 0176        var virtualSeasons = new List<Season>();
 0177        foreach (var existingSeason in series.Children.OfType<Season>())
 178        {
 0179            if (existingSeason.LocationType != LocationType.Virtual && existingSeason.IndexNumber.HasValue)
 180            {
 0181                physicalSeasonNumbers.Add(existingSeason.IndexNumber.Value);
 182            }
 0183            else if (existingSeason.LocationType == LocationType.Virtual)
 184            {
 0185                virtualSeasons.Add(existingSeason);
 186            }
 187        }
 188
 0189        foreach (var virtualSeason in virtualSeasons)
 190        {
 0191            var seasonNumber = virtualSeason.IndexNumber;
 192            // If there's a physical season with the same number or no episodes in the season, delete it
 0193            if ((seasonNumber.HasValue && physicalSeasonNumbers.Contains(seasonNumber.Value))
 0194                || virtualSeason.GetEpisodes().Count == 0)
 195            {
 0196                Logger.LogInformation("Removing virtual season {SeasonNumber} in series {SeriesName}", virtualSeason.Ind
 197
 0198                LibraryManager.DeleteItem(
 0199                    virtualSeason,
 0200                    new DeleteOptions
 0201                    {
 0202                        // Internal metadata paths are removed regardless of this.
 0203                        DeleteFileLocation = false
 0204                    },
 0205                    false);
 206            }
 207        }
 0208    }
 209
 210    internal static HashSet<string> GetPresentEpisodeIds(IEnumerable<Episode> episodes)
 211    {
 5212        var counts = new Dictionary<string, int>(StringComparer.OrdinalIgnoreCase);
 26213        foreach (var episode in episodes)
 214        {
 8215            if (episode.IsVirtualItem || episode.IsMissingEpisode)
 216            {
 217                continue;
 218            }
 219
 36220            foreach (var (provider, id) in episode.ProviderIds)
 221            {
 11222                if (string.IsNullOrWhiteSpace(id))
 223                {
 224                    continue;
 225                }
 226
 10227                var key = IdentityKey(provider, id);
 10228                counts[key] = counts.GetValueOrDefault(key) + 1;
 229            }
 230        }
 231
 5232        return [.. counts.Where(e => e.Value == 1).Select(e => e.Key)];
 233    }
 234
 235    internal static bool IsAlreadyPresent(Episode episode, HashSet<string> presentEpisodeIds)
 236    {
 21237        foreach (var (provider, id) in episode.ProviderIds)
 238        {
 6239            if (!string.IsNullOrWhiteSpace(id) && presentEpisodeIds.Contains(IdentityKey(provider, id)))
 240            {
 3241                return true;
 242            }
 243        }
 244
 3245        return false;
 3246    }
 247
 16248    private static string IdentityKey(string provider, string id) => provider + "=" + id;
 249
 250    private void RemoveObsoleteEpisodes(Series series)
 251    {
 0252        var episodes = series.GetEpisodes(null, new DtoOptions(), true)
 0253                        .OfType<Episode>()
 0254                        .ToList();
 255
 256        // Matched across the whole series, not per season: the orders disagree about which season an episode
 257        // belongs to as readily as they disagree about its number.
 0258        var presentEpisodeIds = GetPresentEpisodeIds(episodes);
 259
 0260        foreach (var seasonEpisodes in episodes.GroupBy(e => e.ParentIndexNumber))
 261        {
 0262            List<Episode> nonPhysicalEpisodes = [];
 0263            List<Episode> physicalEpisodes = [];
 0264            foreach (var episode in seasonEpisodes)
 265            {
 0266                if (episode.IsVirtualItem || episode.IsMissingEpisode)
 267                {
 0268                    nonPhysicalEpisodes.Add(episode);
 0269                    continue;
 270                }
 271
 0272                physicalEpisodes.Add(episode);
 273            }
 274
 275            // Only consider non-physical episodes
 0276            foreach (var episode in nonPhysicalEpisodes)
 277            {
 278                // Episodes without an episode number are practically orphaned and should be deleted
 0279                if (!episode.IndexNumber.HasValue)
 280                {
 0281                    DeleteEpisode(episode, "it has no episode number");
 0282                    continue;
 283                }
 284
 285                // Episodes with a physical equivalent should be deleted (they are no longer missing)
 0286                if (physicalEpisodes.Any(e => e.ContainsEpisodeNumber(episode.IndexNumber.Value)))
 287                {
 0288                    DeleteEpisode(episode, "a physical episode has that number");
 0289                    continue;
 290                }
 291
 0292                if (IsAlreadyPresent(episode, presentEpisodeIds))
 293                {
 0294                    DeleteEpisode(episode, "the same episode is already present under another number");
 295                }
 296            }
 297        }
 0298    }
 299
 300    private void DeleteEpisode(Episode episode, string reason)
 301    {
 0302        Logger.LogInformation(
 0303            "Removing virtual episode S{SeasonNumber}E{EpisodeNumber} in series {SeriesName}: {Reason}",
 0304            episode.ParentIndexNumber,
 0305            episode.IndexNumber,
 0306            episode.SeriesName,
 0307            reason);
 308
 0309        LibraryManager.DeleteItem(
 0310            episode,
 0311            new DeleteOptions
 0312            {
 0313                // Internal metadata paths are removed regardless of this.
 0314                DeleteFileLocation = false
 0315            },
 0316            false);
 0317    }
 318
 319    private static bool NeedsVirtualSeason(Episode episode, HashSet<Guid> physicalSeasonIds, HashSet<string> physicalSea
 320    {
 321        // Episode has a known season number, needs a season
 0322        if (episode.ParentIndexNumber.HasValue)
 323        {
 0324            return true;
 325        }
 326
 327        // Episode has been processed and linked to a season, only needs a virtual season
 328        // if it isn't already linked to a known physical season by ID or path
 0329        if (!episode.SeasonId.IsEmpty())
 330        {
 0331            return !physicalSeasonIds.Contains(episode.SeasonId)
 0332                && !physicalSeasonPaths.Contains(System.IO.Path.GetDirectoryName(episode.Path) ?? string.Empty);
 333        }
 334
 335        // Episode not yet linked, check if it's in a physical season folder
 336        // If yes then skip it, processing not finished
 337        // If no then include it, needs Season Unknown
 0338        var episodeDirectory = System.IO.Path.GetDirectoryName(episode.Path) ?? string.Empty;
 0339        return !physicalSeasonPaths.Contains(episodeDirectory);
 340    }
 341
 342    /// <summary>
 343    /// Creates seasons for all episodes if they don't exist.
 344    /// If no season number can be determined, a dummy season will be created.
 345    /// </summary>
 346    /// <param name="series">The series.</param>
 347    /// <param name="cancellationToken">The cancellation token.</param>
 348    /// <returns>The async task.</returns>
 349    private async Task CreateSeasonsAsync(Series series, CancellationToken cancellationToken)
 350    {
 0351        var seriesChildren = series.GetRecursiveChildren(i => i is Episode || i is Season);
 352
 353        // CreateSeasonsAsync can run before the episodes themselves have been refreshed during an
 354        // initial scan, so their ParentIndexNumber may still be unset. Resolve the season number
 355        // from the path first to avoid creating a premature "Season Unknown" instead of the real
 356        // season for episodes that live directly in a flat series folder.
 0357        foreach (var episode in seriesChildren.OfType<Episode>())
 358        {
 0359            if (episode.ParentIndexNumber.HasValue)
 360            {
 361                continue;
 362            }
 363
 364            try
 365            {
 0366                LibraryManager.FillMissingEpisodeNumbersFromPath(episode, false);
 0367            }
 0368            catch (Exception ex)
 369            {
 0370                Logger.LogError(ex, "Error resolving season number from path for {Path}", episode.Path);
 0371            }
 372        }
 373
 0374        var seasons = seriesChildren.OfType<Season>().ToList();
 0375        var episodes = seriesChildren.OfType<Episode>().ToList();
 376
 0377        var physicalSeasonIds = seasons
 0378            .Where(e => e.LocationType != LocationType.Virtual)
 0379            .Select(e => e.Id)
 0380            .ToHashSet();
 381
 0382        var physicalSeasonPathSet = seasons
 0383            .Where(e => e.LocationType != LocationType.Virtual && !string.IsNullOrEmpty(e.Path))
 0384            .Select(e => e.Path)
 0385            .ToHashSet(StringComparer.OrdinalIgnoreCase);
 386
 0387        var uniqueSeasonNumbers = seriesChildren
 0388            .OfType<Episode>()
 0389            .Where(e => NeedsVirtualSeason(e, physicalSeasonIds, physicalSeasonPathSet))
 0390            .Select(e => e.ParentIndexNumber >= 0 ? e.ParentIndexNumber : null)
 0391            .Distinct();
 392
 393        // Loop through the unique season numbers
 0394        foreach (var seasonNumber in uniqueSeasonNumbers)
 395        {
 396            // Null season numbers will have a 'dummy' season created because seasons are always required.
 0397            var existingSeason = seasons.FirstOrDefault(i => i.IndexNumber == seasonNumber);
 0398            if (existingSeason is null)
 399            {
 0400                var seasonName = GetValidSeasonNameForSeries(series, null, seasonNumber);
 0401                var season = await CreateSeasonAsync(series, seasonName, seasonNumber, cancellationToken).ConfigureAwait
 0402                seasons.Add(season);
 403            }
 0404            else if (existingSeason.IsVirtualItem)
 405            {
 0406                var episodeCount = episodes.Count(e => e.ParentIndexNumber == seasonNumber && !e.IsMissingEpisode);
 0407                if (episodeCount > 0)
 408                {
 0409                    existingSeason.IsVirtualItem = false;
 0410                    await existingSeason.UpdateToRepositoryAsync(ItemUpdateType.MetadataEdit, cancellationToken).Configu
 411                }
 412            }
 413        }
 414
 415        // Loop through episodes
 0416        foreach (var episode in episodes)
 417        {
 0418            var season = seasons.FirstOrDefault(i => i.IndexNumber == episode.ParentIndexNumber);
 0419            if (season is null || episode.SeasonId.Equals(season.Id))
 420            {
 421                continue;
 422            }
 423
 424            // Assign the correct season id and name to episode.
 0425            episode.SeasonId = season.Id;
 0426            episode.SeasonName = season.Name;
 0427            await episode.UpdateToRepositoryAsync(ItemUpdateType.MetadataImport, cancellationToken).ConfigureAwait(false
 428        }
 0429    }
 430
 431    /// <summary>
 432    /// Creates a new season, adds it to the database by linking it to the [series] and refreshes the metadata.
 433    /// </summary>
 434    /// <param name="series">The series.</param>
 435    /// <param name="seasonName">The season name.</param>
 436    /// <param name="seasonNumber">The season number.</param>
 437    /// <param name="cancellationToken">The cancellation token.</param>
 438    /// <returns>The newly created season.</returns>
 439    private async Task<Season> CreateSeasonAsync(
 440        Series series,
 441        string? seasonName,
 442        int? seasonNumber,
 443        CancellationToken cancellationToken)
 444    {
 0445        Logger.LogInformation("Creating Season {SeasonName} entry for {SeriesName}", seasonName, series.Name);
 446
 0447        var season = new Season
 0448        {
 0449            Name = seasonName,
 0450            IndexNumber = seasonNumber,
 0451            Id = LibraryManager.GetNewItemId(
 0452                series.Id + (seasonNumber ?? -1).ToString(CultureInfo.InvariantCulture) + seasonName,
 0453                typeof(Season)),
 0454            IsVirtualItem = false,
 0455            SeriesId = series.Id,
 0456            SeriesName = series.Name,
 0457            SeriesPresentationUniqueKey = series.GetPresentationUniqueKey()
 0458        };
 459
 0460        series.AddChild(season);
 0461        await season.RefreshMetadata(new MetadataRefreshOptions(new DirectoryService(FileSystem)), cancellationToken).Co
 462
 0463        return season;
 0464    }
 465
 466    private string GetValidSeasonNameForSeries(Series series, string? seasonName, int? seasonNumber)
 467    {
 0468        if (string.IsNullOrEmpty(seasonName))
 469        {
 0470            seasonName = seasonNumber switch
 0471            {
 0472                null => _localizationManager.GetLocalizedString("NameSeasonUnknown"),
 0473                0 => LibraryManager.GetLibraryOptions(series).SeasonZeroDisplayName,
 0474                _ => string.Format(CultureInfo.InvariantCulture, _localizationManager.GetLocalizedString("NameSeasonNumb
 0475            };
 476        }
 477
 0478        return seasonName;
 479    }
 480}

Methods/Properties

.ctor(MediaBrowser.Controller.Configuration.IServerConfigurationManager,Microsoft.Extensions.Logging.ILogger`1<MediaBrowser.Providers.TV.SeriesMetadataService>,MediaBrowser.Controller.Providers.IProviderManager,MediaBrowser.Model.IO.IFileSystem,MediaBrowser.Controller.Library.ILibraryManager,MediaBrowser.Model.Globalization.ILocalizationManager,MediaBrowser.Controller.IO.IExternalDataManager,MediaBrowser.Controller.Persistence.IItemRepository)
RefreshMetadata()
AfterMetadataRefresh()
UpdateSeriesChildrenInfoAsync()
MergeData(MediaBrowser.Controller.Providers.MetadataResult`1<MediaBrowser.Controller.Entities.TV.Series>,MediaBrowser.Controller.Providers.MetadataResult`1<MediaBrowser.Controller.Entities.TV.Series>,MediaBrowser.Model.Entities.MetadataField[],System.Boolean,System.Boolean)
RemoveObsoleteSeasons(MediaBrowser.Controller.Entities.TV.Series)
GetPresentEpisodeIds(System.Collections.Generic.IEnumerable`1<MediaBrowser.Controller.Entities.TV.Episode>)
IsAlreadyPresent(MediaBrowser.Controller.Entities.TV.Episode,System.Collections.Generic.HashSet`1<System.String>)
IdentityKey(System.String,System.String)
RemoveObsoleteEpisodes(MediaBrowser.Controller.Entities.TV.Series)
DeleteEpisode(MediaBrowser.Controller.Entities.TV.Episode,System.String)
NeedsVirtualSeason(MediaBrowser.Controller.Entities.TV.Episode,System.Collections.Generic.HashSet`1<System.Guid>,System.Collections.Generic.HashSet`1<System.String>)
CreateSeasonsAsync()
CreateSeasonAsync()
GetValidSeasonNameForSeries(MediaBrowser.Controller.Entities.TV.Series,System.String,System.Nullable`1<System.Int32>)