mirror of
https://github.com/jellyfin/jellyfin.git
synced 2025-04-19 11:44:47 -04:00
Fix build and tests (#13718)
This commit is contained in:
parent
7d6bf5cb0d
commit
0eed5ee79b
2 changed files with 21 additions and 34 deletions
|
@ -19,9 +19,6 @@ public class MusicBrainzRecordingId : IExternalId
|
|||
/// <inheritdoc />
|
||||
public ExternalIdMediaType? Type => ExternalIdMediaType.Recording;
|
||||
|
||||
/// <inheritdoc />
|
||||
public string UrlFormatString => Plugin.Instance!.Configuration.Server + "/recording/{0}";
|
||||
|
||||
/// <inheritdoc />
|
||||
public bool Supports(IHasProviderIds item) => item is Audio;
|
||||
}
|
||||
|
|
|
@ -217,68 +217,58 @@ public class MediaInfoResolverTests
|
|||
string file = "My.Video.srt";
|
||||
data.Add(
|
||||
file,
|
||||
new[]
|
||||
{
|
||||
[
|
||||
CreateMediaStream(VideoDirectoryPath + "/" + file, null, null, 0)
|
||||
},
|
||||
new[]
|
||||
{
|
||||
],
|
||||
[
|
||||
CreateMediaStream(VideoDirectoryPath + "/" + file, null, null, 0)
|
||||
});
|
||||
]);
|
||||
|
||||
// filename has metadata
|
||||
file = "My.Video.Title1.default.forced.sdh.en.srt";
|
||||
data.Add(
|
||||
file,
|
||||
new[]
|
||||
{
|
||||
[
|
||||
CreateMediaStream(VideoDirectoryPath + "/" + file, null, null, 0)
|
||||
},
|
||||
new[]
|
||||
{
|
||||
],
|
||||
[
|
||||
CreateMediaStream(VideoDirectoryPath + "/" + file, "eng", "Title1", 0, true, true, true)
|
||||
});
|
||||
]);
|
||||
|
||||
// single stream with metadata
|
||||
file = "My.Video.mks";
|
||||
data.Add(
|
||||
file,
|
||||
new[]
|
||||
{
|
||||
[
|
||||
CreateMediaStream(VideoDirectoryPath + "/" + file, "eng", "Title", 0, true, true, true)
|
||||
},
|
||||
new[]
|
||||
{
|
||||
CreateMediaStream(VideoDirectoryPath + "/" + file, "eng", "Title", 0, true, true, true)
|
||||
});
|
||||
],
|
||||
[
|
||||
CreateMediaStream(VideoDirectoryPath + "/" + file, "eng", "Title", 0, true, false, true)
|
||||
]);
|
||||
|
||||
// stream wins for title/language, filename wins for flags when conflicting
|
||||
file = "My.Video.Title2.default.forced.sdh.en.srt";
|
||||
data.Add(
|
||||
file,
|
||||
new[]
|
||||
{
|
||||
[
|
||||
CreateMediaStream(VideoDirectoryPath + "/" + file, "fra", "Metadata", 0)
|
||||
},
|
||||
new[]
|
||||
{
|
||||
],
|
||||
[
|
||||
CreateMediaStream(VideoDirectoryPath + "/" + file, "fra", "Metadata", 0, true, true, true)
|
||||
});
|
||||
]);
|
||||
|
||||
// multiple stream with metadata - filename flags ignored but other data filled in when missing from stream
|
||||
file = "My.Video.Title3.default.forced.en.srt";
|
||||
data.Add(
|
||||
file,
|
||||
new[]
|
||||
{
|
||||
[
|
||||
CreateMediaStream(VideoDirectoryPath + "/" + file, null, null, 0, true, true),
|
||||
CreateMediaStream(VideoDirectoryPath + "/" + file, "fra", "Metadata", 1)
|
||||
},
|
||||
new[]
|
||||
{
|
||||
],
|
||||
[
|
||||
CreateMediaStream(VideoDirectoryPath + "/" + file, "eng", "Title3", 0, true, true),
|
||||
CreateMediaStream(VideoDirectoryPath + "/" + file, "fra", "Metadata", 1)
|
||||
});
|
||||
]);
|
||||
|
||||
return data;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue