mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-06-02 13:58:29 +01:00
update nlog
This commit is contained in:
@@ -7,6 +7,7 @@ using MediaBrowser.Controller.Channels;
|
||||
using MediaBrowser.Controller.Configuration;
|
||||
using MediaBrowser.Controller.Entities;
|
||||
using MediaBrowser.Controller.Library;
|
||||
using MediaBrowser.Controller.Providers;
|
||||
using MediaBrowser.Model.Channels;
|
||||
using MediaBrowser.Model.Configuration;
|
||||
using MediaBrowser.Model.Dto;
|
||||
@@ -208,16 +209,6 @@ namespace MediaBrowser.Server.Implementations.Channels
|
||||
CancellationToken cancellationToken,
|
||||
string path)
|
||||
{
|
||||
var limit = GetDownloadLimit(channelOptions);
|
||||
|
||||
if (limit.HasValue)
|
||||
{
|
||||
if (IsSizeLimitReached(path, limit.Value))
|
||||
{
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
var itemId = item.Id.ToString("N");
|
||||
var sources = await _manager.GetChannelItemMediaSources(itemId, false, cancellationToken)
|
||||
.ConfigureAwait(false);
|
||||
@@ -230,6 +221,16 @@ namespace MediaBrowser.Server.Implementations.Channels
|
||||
return;
|
||||
}
|
||||
|
||||
var limit = GetDownloadLimit(channelOptions);
|
||||
|
||||
if (limit.HasValue)
|
||||
{
|
||||
if (IsSizeLimitReached(path, limit.Value))
|
||||
{
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
var channelItem = (IChannelMediaItem)item;
|
||||
|
||||
var destination = Path.Combine(path, channelItem.ChannelId, itemId);
|
||||
@@ -254,10 +255,25 @@ namespace MediaBrowser.Server.Implementations.Channels
|
||||
|
||||
if (item != null)
|
||||
{
|
||||
// Get the version from the database
|
||||
item = _libraryManager.GetItemById(item.Id) ?? item;
|
||||
var forceSave = false;
|
||||
|
||||
await item.RefreshMetadata(cancellationToken).ConfigureAwait(false);
|
||||
// Get the version from the database
|
||||
var dbItem = _libraryManager.GetItemById(item.Id);
|
||||
|
||||
if (dbItem == null)
|
||||
{
|
||||
forceSave = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
item = dbItem;
|
||||
}
|
||||
|
||||
await item.RefreshMetadata(new MetadataRefreshOptions
|
||||
{
|
||||
ForceSave = forceSave
|
||||
|
||||
}, cancellationToken).ConfigureAwait(false);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user