Fix build and tests (#13718)

This commit is contained in:
Tim Eisele 2025-03-14 15:17:18 +01:00 committed by GitHub
parent 7d6bf5cb0d
commit 0eed5ee79b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 21 additions and 34 deletions

View file

@ -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;
}

View file

@ -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;
}