|
|
|
@ -47,65 +47,80 @@ namespace Jellyfin.Server.Implementations.Tests.Data
|
|
|
|
|
|
|
|
|
|
public static TheoryData<string, ItemImageInfo> ItemImageInfoFromValueString_Valid_TestData()
|
|
|
|
|
{
|
|
|
|
|
var data = new TheoryData<string, ItemImageInfo>();
|
|
|
|
|
|
|
|
|
|
data.Add(
|
|
|
|
|
"/mnt/series/Family Guy/Season 1/Family Guy - S01E01-thumb.jpg*637452096478512963*Primary*1920*1080*WjQbtJtSO8nhNZ%L_Io#R/oaS6o}-;adXAoIn7j[%hW9s:WGw[nN",
|
|
|
|
|
new ItemImageInfo
|
|
|
|
|
var data = new TheoryData<string, ItemImageInfo>
|
|
|
|
|
{
|
|
|
|
|
{
|
|
|
|
|
Path = "/mnt/series/Family Guy/Season 1/Family Guy - S01E01-thumb.jpg",
|
|
|
|
|
Type = ImageType.Primary,
|
|
|
|
|
DateModified = new DateTime(637452096478512963, DateTimeKind.Utc),
|
|
|
|
|
Width = 1920,
|
|
|
|
|
Height = 1080,
|
|
|
|
|
BlurHash = "WjQbtJtSO8nhNZ%L_Io#R*oaS6o}-;adXAoIn7j[%hW9s:WGw[nN"
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
data.Add(
|
|
|
|
|
"https://image.tmdb.org/t/p/original/zhB5CHEgqqh4wnEqDNJLfWXJlcL.jpg*0*Primary*0*0",
|
|
|
|
|
new ItemImageInfo
|
|
|
|
|
"/mnt/series/Family Guy/Season 1/Family Guy - S01E01-thumb.jpg*637452096478512963*Primary*1920*1080*WjQbtJtSO8nhNZ%L_Io#R/oaS6o}-;adXAoIn7j[%hW9s:WGw[nN*938c2cc0dcc05f2b68c4287040cfcf71",
|
|
|
|
|
new ItemImageInfo
|
|
|
|
|
{
|
|
|
|
|
Path = "/mnt/series/Family Guy/Season 1/Family Guy - S01E01-thumb.jpg",
|
|
|
|
|
Type = ImageType.Primary,
|
|
|
|
|
DateModified = new DateTime(637452096478512963, DateTimeKind.Utc),
|
|
|
|
|
Width = 1920,
|
|
|
|
|
Height = 1080,
|
|
|
|
|
BlurHash = "WjQbtJtSO8nhNZ%L_Io#R*oaS6o}-;adXAoIn7j[%hW9s:WGw[nN",
|
|
|
|
|
FileHash = "938c2cc0dcc05f2b68c4287040cfcf71"
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
Path = "https://image.tmdb.org/t/p/original/zhB5CHEgqqh4wnEqDNJLfWXJlcL.jpg",
|
|
|
|
|
Type = ImageType.Primary,
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
data.Add(
|
|
|
|
|
"https://image.tmdb.org/t/p/original/zhB5CHEgqqh4wnEqDNJLfWXJlcL.jpg*0*Primary",
|
|
|
|
|
new ItemImageInfo
|
|
|
|
|
"https://image.tmdb.org/t/p/original/zhB5CHEgqqh4wnEqDNJLfWXJlcL.jpg*0*Primary*0*0",
|
|
|
|
|
new ItemImageInfo
|
|
|
|
|
{
|
|
|
|
|
Path = "https://image.tmdb.org/t/p/original/zhB5CHEgqqh4wnEqDNJLfWXJlcL.jpg",
|
|
|
|
|
Type = ImageType.Primary,
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
Path = "https://image.tmdb.org/t/p/original/zhB5CHEgqqh4wnEqDNJLfWXJlcL.jpg",
|
|
|
|
|
Type = ImageType.Primary,
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
data.Add(
|
|
|
|
|
"https://image.tmdb.org/t/p/original/zhB5CHEgqqh4wnEqDNJLfWXJlcL.jpg*0*Primary*600",
|
|
|
|
|
new ItemImageInfo
|
|
|
|
|
"https://image.tmdb.org/t/p/original/zhB5CHEgqqh4wnEqDNJLfWXJlcL.jpg*0*Primary",
|
|
|
|
|
new ItemImageInfo
|
|
|
|
|
{
|
|
|
|
|
Path = "https://image.tmdb.org/t/p/original/zhB5CHEgqqh4wnEqDNJLfWXJlcL.jpg",
|
|
|
|
|
Type = ImageType.Primary,
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
Path = "https://image.tmdb.org/t/p/original/zhB5CHEgqqh4wnEqDNJLfWXJlcL.jpg",
|
|
|
|
|
Type = ImageType.Primary,
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
data.Add(
|
|
|
|
|
"%MetadataPath%/library/68/68578562b96c80a7ebd530848801f645/poster.jpg*637264380567586027*Primary*600*336",
|
|
|
|
|
new ItemImageInfo
|
|
|
|
|
"https://image.tmdb.org/t/p/original/zhB5CHEgqqh4wnEqDNJLfWXJlcL.jpg*0*Primary*600",
|
|
|
|
|
new ItemImageInfo
|
|
|
|
|
{
|
|
|
|
|
Path = "https://image.tmdb.org/t/p/original/zhB5CHEgqqh4wnEqDNJLfWXJlcL.jpg",
|
|
|
|
|
Type = ImageType.Primary,
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
"%MetadataPath%/library/68/68578562b96c80a7ebd530848801f645/poster.jpg*637264380567586027*Primary*600*336",
|
|
|
|
|
new ItemImageInfo
|
|
|
|
|
{
|
|
|
|
|
Path = "/meta/data/path/library/68/68578562b96c80a7ebd530848801f645/poster.jpg",
|
|
|
|
|
Type = ImageType.Primary,
|
|
|
|
|
DateModified = new DateTime(637264380567586027, DateTimeKind.Utc),
|
|
|
|
|
Width = 600,
|
|
|
|
|
Height = 336
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
Path = "/meta/data/path/library/68/68578562b96c80a7ebd530848801f645/poster.jpg",
|
|
|
|
|
Type = ImageType.Primary,
|
|
|
|
|
DateModified = new DateTime(637264380567586027, DateTimeKind.Utc),
|
|
|
|
|
Width = 600,
|
|
|
|
|
Height = 336
|
|
|
|
|
});
|
|
|
|
|
"%MetadataPath%/library/68/68578562b96c80a7ebd530848801f645/poster.jpg*637264380567586027*Primary*600*336**938c2cc0dcc05f2b68c4287040cfcf71",
|
|
|
|
|
new ItemImageInfo
|
|
|
|
|
{
|
|
|
|
|
Path = "/meta/data/path/library/68/68578562b96c80a7ebd530848801f645/poster.jpg",
|
|
|
|
|
Type = ImageType.Primary,
|
|
|
|
|
DateModified = new DateTime(637264380567586027, DateTimeKind.Utc),
|
|
|
|
|
Width = 600,
|
|
|
|
|
Height = 336,
|
|
|
|
|
FileHash = "938c2cc0dcc05f2b68c4287040cfcf71"
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
return data;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public static TheoryData<string, ItemImageInfo[]> DeserializeImages_Valid_TestData()
|
|
|
|
|
{
|
|
|
|
|
var data = new TheoryData<string, ItemImageInfo[]>();
|
|
|
|
|
data.Add(
|
|
|
|
|
"/mnt/series/Family Guy/Season 1/Family Guy - S01E01-thumb.jpg*637452096478512963*Primary*1920*1080*WjQbtJtSO8nhNZ%L_Io#R/oaS6o}-;adXAoIn7j[%hW9s:WGw[nN",
|
|
|
|
|
new ItemImageInfo[]
|
|
|
|
|
var data = new TheoryData<string, ItemImageInfo[]>
|
|
|
|
|
{
|
|
|
|
|
{
|
|
|
|
|
"/mnt/series/Family Guy/Season 1/Family Guy - S01E01-thumb.jpg*637452096478512963*Primary*1920*1080*WjQbtJtSO8nhNZ%L_Io#R/oaS6o}-;adXAoIn7j[%hW9s:WGw[nN",
|
|
|
|
|
[
|
|
|
|
|
new ItemImageInfo()
|
|
|
|
|
{
|
|
|
|
|
Path = "/mnt/series/Family Guy/Season 1/Family Guy - S01E01-thumb.jpg",
|
|
|
|
@ -115,12 +130,11 @@ namespace Jellyfin.Server.Implementations.Tests.Data
|
|
|
|
|
Height = 1080,
|
|
|
|
|
BlurHash = "WjQbtJtSO8nhNZ%L_Io#R*oaS6o}-;adXAoIn7j[%hW9s:WGw[nN"
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
data.Add(
|
|
|
|
|
"%MetadataPath%/library/2a/2a27372f1e9bc757b1db99721bbeae1e/poster.jpg*637261226720645297*Primary*0*0|%MetadataPath%/library/2a/2a27372f1e9bc757b1db99721bbeae1e/logo.png*637261226720805297*Logo*0*0|%MetadataPath%/library/2a/2a27372f1e9bc757b1db99721bbeae1e/landscape.jpg*637261226721285297*Thumb*0*0|%MetadataPath%/library/2a/2a27372f1e9bc757b1db99721bbeae1e/backdrop.jpg*637261226721685297*Backdrop*0*0",
|
|
|
|
|
new ItemImageInfo[]
|
|
|
|
|
]
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
"%MetadataPath%/library/2a/2a27372f1e9bc757b1db99721bbeae1e/poster.jpg*637261226720645297*Primary*0*0|%MetadataPath%/library/2a/2a27372f1e9bc757b1db99721bbeae1e/logo.png*637261226720805297*Logo*0*0|%MetadataPath%/library/2a/2a27372f1e9bc757b1db99721bbeae1e/landscape.jpg*637261226721285297*Thumb*0*0|%MetadataPath%/library/2a/2a27372f1e9bc757b1db99721bbeae1e/backdrop.jpg*637261226721685297*Backdrop*0*0",
|
|
|
|
|
[
|
|
|
|
|
new ItemImageInfo()
|
|
|
|
|
{
|
|
|
|
|
Path = "/meta/data/path/library/2a/2a27372f1e9bc757b1db99721bbeae1e/poster.jpg",
|
|
|
|
@ -145,22 +159,24 @@ namespace Jellyfin.Server.Implementations.Tests.Data
|
|
|
|
|
Type = ImageType.Backdrop,
|
|
|
|
|
DateModified = new DateTime(637261226721685297, DateTimeKind.Utc),
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
]
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
return data;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public static TheoryData<string, ItemImageInfo[]> DeserializeImages_ValidAndInvalid_TestData()
|
|
|
|
|
{
|
|
|
|
|
var data = new TheoryData<string, ItemImageInfo[]>();
|
|
|
|
|
data.Add(
|
|
|
|
|
string.Empty,
|
|
|
|
|
Array.Empty<ItemImageInfo>());
|
|
|
|
|
|
|
|
|
|
data.Add(
|
|
|
|
|
"/mnt/series/Family Guy/Season 1/Family Guy - S01E01-thumb.jpg*637452096478512963*Primary*1920*1080*WjQbtJtSO8nhNZ%L_Io#R/oaS6o}-;adXAoIn7j[%hW9s:WGw[nN|test|1234||ss",
|
|
|
|
|
new ItemImageInfo[]
|
|
|
|
|
var data = new TheoryData<string, ItemImageInfo[]>
|
|
|
|
|
{
|
|
|
|
|
{
|
|
|
|
|
string.Empty,
|
|
|
|
|
Array.Empty<ItemImageInfo>()
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
"/mnt/series/Family Guy/Season 1/Family Guy - S01E01-thumb.jpg*637452096478512963*Primary*1920*1080*WjQbtJtSO8nhNZ%L_Io#R/oaS6o}-;adXAoIn7j[%hW9s:WGw[nN|test|1234||ss",
|
|
|
|
|
[
|
|
|
|
|
new()
|
|
|
|
|
{
|
|
|
|
|
Path = "/mnt/series/Family Guy/Season 1/Family Guy - S01E01-thumb.jpg",
|
|
|
|
@ -170,18 +186,20 @@ namespace Jellyfin.Server.Implementations.Tests.Data
|
|
|
|
|
Height = 1080,
|
|
|
|
|
BlurHash = "WjQbtJtSO8nhNZ%L_Io#R*oaS6o}-;adXAoIn7j[%hW9s:WGw[nN"
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
data.Add(
|
|
|
|
|
"|",
|
|
|
|
|
Array.Empty<ItemImageInfo>());
|
|
|
|
|
]
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
"|",
|
|
|
|
|
Array.Empty<ItemImageInfo>()
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
return data;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private sealed class ProviderIdsExtensionsTestsObject : IHasProviderIds
|
|
|
|
|
{
|
|
|
|
|
public Dictionary<string, string> ProviderIds { get; set; } = new Dictionary<string, string>();
|
|
|
|
|
public Dictionary<string, string> ProviderIds { get; set; } = [];
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|