Skip to content

Commit

Permalink
misc: merge paths for special and other type episodes
Browse files Browse the repository at this point in the history
…because they should had probably been merged into one earlier…
  • Loading branch information
revam committed Sep 8, 2024
1 parent 55c7ce3 commit ea04250
Showing 1 changed file with 1 addition and 15 deletions.
16 changes: 1 addition & 15 deletions Shokofin/Utils/Ordering.cs
Original file line number Diff line number Diff line change
Expand Up @@ -264,21 +264,7 @@ public static int GetSeasonNumber(ShowInfo showInfo, SeasonInfo seasonInfo, Epis
return ExtraType.ThemeVideo;
case EpisodeType.Trailer:
return ExtraType.Trailer;
case EpisodeType.Other: {
var title = Text.GetTitlesForLanguage(episode.Titles, false, "en");
if (string.IsNullOrEmpty(title))
return null;
// Interview
if (title.Contains("interview", System.StringComparison.OrdinalIgnoreCase))
return ExtraType.Interview;
// Cinema/theatrical intro/outro
if (
(title.StartsWith("cinema ", System.StringComparison.OrdinalIgnoreCase) || title.StartsWith("theatrical ", System.StringComparison.OrdinalIgnoreCase)) &&
(title.Contains("intro", System.StringComparison.OrdinalIgnoreCase) || title.Contains("outro", System.StringComparison.OrdinalIgnoreCase))
)
return ExtraType.Clip;
return null;
}
case EpisodeType.Other:
case EpisodeType.Special: {
var title = Text.GetTitlesForLanguage(episode.Titles, false, "en");
if (string.IsNullOrEmpty(title))
Expand Down

0 comments on commit ea04250

Please sign in to comment.