mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-06-03 06:18:28 +01:00
boxset image fixes
This commit is contained in:
@@ -22,6 +22,17 @@ namespace MediaBrowser.Server.Implementations.Collections
|
||||
{
|
||||
}
|
||||
|
||||
protected override bool Supports(IHasImages item)
|
||||
{
|
||||
// Right now this is the only way to prevent this image from getting created ahead of internet image providers
|
||||
if (!item.IsLocked)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
return base.Supports(item);
|
||||
}
|
||||
|
||||
protected override Task<List<BaseItem>> GetItemsWithImages(IHasImages item)
|
||||
{
|
||||
var playlist = (BoxSet)item;
|
||||
|
||||
@@ -73,7 +73,7 @@ namespace MediaBrowser.Server.Implementations.Collections
|
||||
|
||||
try
|
||||
{
|
||||
_fileSystem.CreateDirectory(path);
|
||||
_fileSystem.CreateDirectory(path);
|
||||
|
||||
var collection = new BoxSet
|
||||
{
|
||||
@@ -93,7 +93,12 @@ namespace MediaBrowser.Server.Implementations.Collections
|
||||
|
||||
if (options.ItemIdList.Count > 0)
|
||||
{
|
||||
await AddToCollection(collection.Id, options.ItemIdList, false);
|
||||
await AddToCollection(collection.Id, options.ItemIdList, false, new MetadataRefreshOptions(_fileSystem)
|
||||
{
|
||||
// The initial adding of items is going to create a local metadata file
|
||||
// This will cause internet metadata to be skipped as a result
|
||||
MetadataRefreshMode = MetadataRefreshMode.FullRefresh
|
||||
});
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -145,10 +150,10 @@ namespace MediaBrowser.Server.Implementations.Collections
|
||||
|
||||
public Task AddToCollection(Guid collectionId, IEnumerable<Guid> ids)
|
||||
{
|
||||
return AddToCollection(collectionId, ids, true);
|
||||
return AddToCollection(collectionId, ids, true, new MetadataRefreshOptions(_fileSystem));
|
||||
}
|
||||
|
||||
private async Task AddToCollection(Guid collectionId, IEnumerable<Guid> ids, bool fireEvent)
|
||||
private async Task AddToCollection(Guid collectionId, IEnumerable<Guid> ids, bool fireEvent, MetadataRefreshOptions refreshOptions)
|
||||
{
|
||||
var collection = _libraryManager.GetItemById(collectionId) as BoxSet;
|
||||
|
||||
@@ -186,7 +191,7 @@ namespace MediaBrowser.Server.Implementations.Collections
|
||||
|
||||
await collection.UpdateToRepository(ItemUpdateType.MetadataEdit, CancellationToken.None).ConfigureAwait(false);
|
||||
|
||||
_providerManager.QueueRefresh(collection.Id, new MetadataRefreshOptions(_fileSystem));
|
||||
_providerManager.QueueRefresh(collection.Id, refreshOptions);
|
||||
|
||||
if (fireEvent)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user