Skip to content

Commit

Permalink
Merge pull request #8638 from photonconvergence/fix/extras-type
Browse files Browse the repository at this point in the history
  • Loading branch information
Bond-009 committed Oct 30, 2022
2 parents cb4521f + 09e8a7e commit f6e7313
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 8 deletions.
14 changes: 10 additions & 4 deletions Emby.Naming/Common/NamingOptions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -512,13 +512,13 @@ public NamingOptions()
MediaType.Video),

new ExtraRule(
ExtraType.Clip,
ExtraType.Short,
ExtraRuleType.DirectoryName,
"shorts",
MediaType.Video),

new ExtraRule(
ExtraType.Clip,
ExtraType.Featurette,
ExtraRuleType.DirectoryName,
"featurettes",
MediaType.Video),
Expand All @@ -535,6 +535,12 @@ public NamingOptions()
"other",
MediaType.Video),

new ExtraRule(
ExtraType.Clip,
ExtraRuleType.DirectoryName,
"clips",
MediaType.Video),

new ExtraRule(
ExtraType.Trailer,
ExtraRuleType.Filename,
Expand Down Expand Up @@ -638,13 +644,13 @@ public NamingOptions()
MediaType.Video),

new ExtraRule(
ExtraType.Clip,
ExtraType.Featurette,
ExtraRuleType.Suffix,
"-featurette",
MediaType.Video),

new ExtraRule(
ExtraType.Clip,
ExtraType.Short,
ExtraRuleType.Suffix,
"-short",
MediaType.Video),
Expand Down
4 changes: 3 additions & 1 deletion MediaBrowser.Controller/Entities/BaseItem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,9 @@ public abstract class BaseItem : IHasProviderIds, IHasLookupInfo<ItemLookupInfo>
Model.Entities.ExtraType.DeletedScene,
Model.Entities.ExtraType.Interview,
Model.Entities.ExtraType.Sample,
Model.Entities.ExtraType.Scene
Model.Entities.ExtraType.Scene,
Model.Entities.ExtraType.Featurette,
Model.Entities.ExtraType.Short
};

private string _sortName;
Expand Down
4 changes: 3 additions & 1 deletion MediaBrowser.Model/Entities/ExtraType.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ public enum ExtraType
Scene = 6,
Sample = 7,
ThemeSong = 8,
ThemeVideo = 9
ThemeVideo = 9,
Featurette = 10,
Short = 11
}
}
5 changes: 3 additions & 2 deletions tests/Jellyfin.Naming.Tests/Video/ExtraTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,9 @@ public void TestExpandedExtras()
[InlineData(ExtraType.Interview, "interviews")]
[InlineData(ExtraType.Scene, "scenes")]
[InlineData(ExtraType.Sample, "samples")]
[InlineData(ExtraType.Clip, "shorts")]
[InlineData(ExtraType.Clip, "featurettes")]
[InlineData(ExtraType.Short, "shorts")]
[InlineData(ExtraType.Featurette, "featurettes")]
[InlineData(ExtraType.Clip, "clips")]
[InlineData(ExtraType.ThemeVideo, "backdrops")]
[InlineData(ExtraType.Unknown, "extras")]
public void TestDirectories(ExtraType type, string dirName)
Expand Down

0 comments on commit f6e7313

Please sign in to comment.