|
|
|
@ -209,7 +209,7 @@ namespace Jellyfin.Providers.Tests.Manager
|
|
|
|
|
[InlineData(ImageType.Backdrop, 2, false)]
|
|
|
|
|
[InlineData(ImageType.Primary, 1, true)]
|
|
|
|
|
[InlineData(ImageType.Backdrop, 2, true)]
|
|
|
|
|
public async void RefreshImages_PopulatedItemPopulatedProviderDynamic_UpdatesImagesIfForced(ImageType imageType, int imageCount, bool forceRefresh)
|
|
|
|
|
public async Task RefreshImages_PopulatedItemPopulatedProviderDynamic_UpdatesImagesIfForced(ImageType imageType, int imageCount, bool forceRefresh)
|
|
|
|
|
{
|
|
|
|
|
var item = GetItemWithImages(imageType, imageCount, false);
|
|
|
|
|
|
|
|
|
@ -261,7 +261,7 @@ namespace Jellyfin.Providers.Tests.Manager
|
|
|
|
|
[InlineData(ImageType.Backdrop, 2, true, MediaProtocol.File)]
|
|
|
|
|
[InlineData(ImageType.Primary, 1, false, MediaProtocol.File)]
|
|
|
|
|
[InlineData(ImageType.Backdrop, 2, false, MediaProtocol.File)]
|
|
|
|
|
public async void RefreshImages_EmptyItemPopulatedProviderDynamic_AddsImages(ImageType imageType, int imageCount, bool responseHasPath, MediaProtocol protocol)
|
|
|
|
|
public async Task RefreshImages_EmptyItemPopulatedProviderDynamic_AddsImages(ImageType imageType, int imageCount, bool responseHasPath, MediaProtocol protocol)
|
|
|
|
|
{
|
|
|
|
|
// Has to exist for querying DateModified time on file, results stored but not checked so not populating
|
|
|
|
|
BaseItem.FileSystem = Mock.Of<IFileSystem>();
|
|
|
|
@ -311,7 +311,7 @@ namespace Jellyfin.Providers.Tests.Manager
|
|
|
|
|
[InlineData(ImageType.Primary, 1, true)]
|
|
|
|
|
[InlineData(ImageType.Backdrop, 1, true)]
|
|
|
|
|
[InlineData(ImageType.Backdrop, 2, true)]
|
|
|
|
|
public async void RefreshImages_PopulatedItemPopulatedProviderRemote_UpdatesImagesIfForced(ImageType imageType, int imageCount, bool forceRefresh)
|
|
|
|
|
public async Task RefreshImages_PopulatedItemPopulatedProviderRemote_UpdatesImagesIfForced(ImageType imageType, int imageCount, bool forceRefresh)
|
|
|
|
|
{
|
|
|
|
|
var item = GetItemWithImages(imageType, imageCount, false);
|
|
|
|
|
|
|
|
|
@ -366,7 +366,7 @@ namespace Jellyfin.Providers.Tests.Manager
|
|
|
|
|
[InlineData(ImageType.Backdrop, 0, false)] // empty item, no cache to check
|
|
|
|
|
[InlineData(ImageType.Backdrop, 1, false)] // populated item, cached so no download
|
|
|
|
|
[InlineData(ImageType.Backdrop, 1, true)] // populated item, forced to download
|
|
|
|
|
public async void RefreshImages_NonStubItemPopulatedProviderRemote_DownloadsIfNecessary(ImageType imageType, int initialImageCount, bool fullRefresh)
|
|
|
|
|
public async Task RefreshImages_NonStubItemPopulatedProviderRemote_DownloadsIfNecessary(ImageType imageType, int initialImageCount, bool fullRefresh)
|
|
|
|
|
{
|
|
|
|
|
var targetImageCount = 1;
|
|
|
|
|
|
|
|
|
@ -429,7 +429,7 @@ namespace Jellyfin.Providers.Tests.Manager
|
|
|
|
|
|
|
|
|
|
[Theory]
|
|
|
|
|
[MemberData(nameof(GetImageTypesWithCount))]
|
|
|
|
|
public async void RefreshImages_EmptyItemPopulatedProviderRemoteExtras_LimitsImages(ImageType imageType, int imageCount)
|
|
|
|
|
public async Task RefreshImages_EmptyItemPopulatedProviderRemoteExtras_LimitsImages(ImageType imageType, int imageCount)
|
|
|
|
|
{
|
|
|
|
|
var item = new Video();
|
|
|
|
|
|
|
|
|
@ -473,7 +473,7 @@ namespace Jellyfin.Providers.Tests.Manager
|
|
|
|
|
|
|
|
|
|
[Theory]
|
|
|
|
|
[MemberData(nameof(GetImageTypesWithCount))]
|
|
|
|
|
public async void RefreshImages_PopulatedItemEmptyProviderRemoteFullRefresh_DoesntClearImages(ImageType imageType, int imageCount)
|
|
|
|
|
public async Task RefreshImages_PopulatedItemEmptyProviderRemoteFullRefresh_DoesntClearImages(ImageType imageType, int imageCount)
|
|
|
|
|
{
|
|
|
|
|
var item = GetItemWithImages(imageType, imageCount, false);
|
|
|
|
|
|
|
|
|
@ -501,7 +501,7 @@ namespace Jellyfin.Providers.Tests.Manager
|
|
|
|
|
[InlineData(9, false)]
|
|
|
|
|
[InlineData(10, true)]
|
|
|
|
|
[InlineData(null, true)]
|
|
|
|
|
public async void RefreshImages_ProviderRemote_FiltersByWidth(int? remoteImageWidth, bool expectedToUpdate)
|
|
|
|
|
public async Task RefreshImages_ProviderRemote_FiltersByWidth(int? remoteImageWidth, bool expectedToUpdate)
|
|
|
|
|
{
|
|
|
|
|
var imageType = ImageType.Primary;
|
|
|
|
|
|
|
|
|
|