mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-04-23 18:44:45 +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);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1140,7 +1140,7 @@ namespace MediaBrowser.Server.Implementations.Dto
|
||||
dto.AbsoluteEpisodeNumber = episode.AbsoluteEpisodeNumber;
|
||||
}
|
||||
|
||||
//if (fields.Contains(ItemFields.SpecialEpisodeNumbers))
|
||||
if (fields.Contains(ItemFields.SpecialEpisodeNumbers))
|
||||
{
|
||||
dto.AirsAfterSeasonNumber = episode.AirsAfterSeasonNumber;
|
||||
dto.AirsBeforeEpisodeNumber = episode.AirsBeforeEpisodeNumber;
|
||||
@@ -1449,7 +1449,6 @@ namespace MediaBrowser.Server.Implementations.Dto
|
||||
|
||||
dto.RecursiveItemCount = recursiveItemCount;
|
||||
dto.UserData.UnplayedItemCount = unplayed;
|
||||
dto.RecursiveUnplayedItemCount = unplayed;
|
||||
|
||||
if (recursiveItemCount > 0)
|
||||
{
|
||||
|
||||
@@ -577,7 +577,7 @@ namespace MediaBrowser.Server.Implementations.Library
|
||||
|
||||
var fullPath = fileInfo.FullName;
|
||||
|
||||
if (string.IsNullOrWhiteSpace(collectionType))
|
||||
if (string.IsNullOrWhiteSpace(collectionType) && parent != null)
|
||||
{
|
||||
collectionType = GetContentTypeOverride(fullPath, true);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user