Fix extra type differentiation
Change rules for Featurettes and Shorts so they don't both get classed as ExtraType.Clip. Fix test that these changes break
This commit is contained in:
parent
790f67aac1
commit
09e8a7e62c
|
@ -512,13 +512,13 @@ namespace Emby.Naming.Common
|
||||||
MediaType.Video),
|
MediaType.Video),
|
||||||
|
|
||||||
new ExtraRule(
|
new ExtraRule(
|
||||||
ExtraType.Clip,
|
ExtraType.Short,
|
||||||
ExtraRuleType.DirectoryName,
|
ExtraRuleType.DirectoryName,
|
||||||
"shorts",
|
"shorts",
|
||||||
MediaType.Video),
|
MediaType.Video),
|
||||||
|
|
||||||
new ExtraRule(
|
new ExtraRule(
|
||||||
ExtraType.Clip,
|
ExtraType.Featurette,
|
||||||
ExtraRuleType.DirectoryName,
|
ExtraRuleType.DirectoryName,
|
||||||
"featurettes",
|
"featurettes",
|
||||||
MediaType.Video),
|
MediaType.Video),
|
||||||
|
@ -535,6 +535,12 @@ namespace Emby.Naming.Common
|
||||||
"other",
|
"other",
|
||||||
MediaType.Video),
|
MediaType.Video),
|
||||||
|
|
||||||
|
new ExtraRule(
|
||||||
|
ExtraType.Clip,
|
||||||
|
ExtraRuleType.DirectoryName,
|
||||||
|
"clips",
|
||||||
|
MediaType.Video),
|
||||||
|
|
||||||
new ExtraRule(
|
new ExtraRule(
|
||||||
ExtraType.Trailer,
|
ExtraType.Trailer,
|
||||||
ExtraRuleType.Filename,
|
ExtraRuleType.Filename,
|
||||||
|
@ -638,13 +644,13 @@ namespace Emby.Naming.Common
|
||||||
MediaType.Video),
|
MediaType.Video),
|
||||||
|
|
||||||
new ExtraRule(
|
new ExtraRule(
|
||||||
ExtraType.Clip,
|
ExtraType.Featurette,
|
||||||
ExtraRuleType.Suffix,
|
ExtraRuleType.Suffix,
|
||||||
"-featurette",
|
"-featurette",
|
||||||
MediaType.Video),
|
MediaType.Video),
|
||||||
|
|
||||||
new ExtraRule(
|
new ExtraRule(
|
||||||
ExtraType.Clip,
|
ExtraType.Short,
|
||||||
ExtraRuleType.Suffix,
|
ExtraRuleType.Suffix,
|
||||||
"-short",
|
"-short",
|
||||||
MediaType.Video),
|
MediaType.Video),
|
||||||
|
|
|
@ -75,7 +75,9 @@ namespace MediaBrowser.Controller.Entities
|
||||||
Model.Entities.ExtraType.DeletedScene,
|
Model.Entities.ExtraType.DeletedScene,
|
||||||
Model.Entities.ExtraType.Interview,
|
Model.Entities.ExtraType.Interview,
|
||||||
Model.Entities.ExtraType.Sample,
|
Model.Entities.ExtraType.Sample,
|
||||||
Model.Entities.ExtraType.Scene
|
Model.Entities.ExtraType.Scene,
|
||||||
|
Model.Entities.ExtraType.Featurette,
|
||||||
|
Model.Entities.ExtraType.Short
|
||||||
};
|
};
|
||||||
|
|
||||||
private string _sortName;
|
private string _sortName;
|
||||||
|
|
|
@ -13,6 +13,8 @@ namespace MediaBrowser.Model.Entities
|
||||||
Scene = 6,
|
Scene = 6,
|
||||||
Sample = 7,
|
Sample = 7,
|
||||||
ThemeSong = 8,
|
ThemeSong = 8,
|
||||||
ThemeVideo = 9
|
ThemeVideo = 9,
|
||||||
|
Featurette = 10,
|
||||||
|
Short = 11
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -51,8 +51,9 @@ namespace Jellyfin.Naming.Tests.Video
|
||||||
[InlineData(ExtraType.Interview, "interviews")]
|
[InlineData(ExtraType.Interview, "interviews")]
|
||||||
[InlineData(ExtraType.Scene, "scenes")]
|
[InlineData(ExtraType.Scene, "scenes")]
|
||||||
[InlineData(ExtraType.Sample, "samples")]
|
[InlineData(ExtraType.Sample, "samples")]
|
||||||
[InlineData(ExtraType.Clip, "shorts")]
|
[InlineData(ExtraType.Short, "shorts")]
|
||||||
[InlineData(ExtraType.Clip, "featurettes")]
|
[InlineData(ExtraType.Featurette, "featurettes")]
|
||||||
|
[InlineData(ExtraType.Clip, "clips")]
|
||||||
[InlineData(ExtraType.ThemeVideo, "backdrops")]
|
[InlineData(ExtraType.ThemeVideo, "backdrops")]
|
||||||
[InlineData(ExtraType.Unknown, "extras")]
|
[InlineData(ExtraType.Unknown, "extras")]
|
||||||
public void TestDirectories(ExtraType type, string dirName)
|
public void TestDirectories(ExtraType type, string dirName)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user