mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-04-20 17:14:42 +01:00
expose omdb to metadata config
This commit is contained in:
@@ -178,7 +178,7 @@ namespace MediaBrowser.Controller.Entities.Audio
|
||||
// Refresh all non-songs
|
||||
foreach (var item in others)
|
||||
{
|
||||
if (tasks.Count > 3)
|
||||
if (tasks.Count > 4)
|
||||
{
|
||||
await Task.WhenAll(tasks).ConfigureAwait(false);
|
||||
tasks.Clear();
|
||||
@@ -202,7 +202,9 @@ namespace MediaBrowser.Controller.Entities.Audio
|
||||
}
|
||||
});
|
||||
|
||||
tasks.Add(RefreshItem(item, refreshOptions, innerProgress, cancellationToken));
|
||||
// Avoid implicitly captured closure
|
||||
var taskChild = item;
|
||||
tasks.Add(Task.Run(async () => await RefreshItem(taskChild, refreshOptions, innerProgress, cancellationToken).ConfigureAwait(false), cancellationToken));
|
||||
}
|
||||
|
||||
await Task.WhenAll(tasks).ConfigureAwait(false);
|
||||
|
||||
@@ -1236,7 +1236,7 @@ namespace MediaBrowser.Controller.Entities
|
||||
|
||||
public virtual Task UpdateToRepository(ItemUpdateType updateReason, CancellationToken cancellationToken)
|
||||
{
|
||||
return LibraryManager.UpdateItem(this, ItemUpdateType.ImageUpdate, cancellationToken);
|
||||
return LibraryManager.UpdateItem(this, updateReason, cancellationToken);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
@@ -521,7 +521,7 @@ namespace MediaBrowser.Controller.Entities
|
||||
|
||||
foreach (var child in children)
|
||||
{
|
||||
if (tasks.Count >= 8)
|
||||
if (tasks.Count >= 4)
|
||||
{
|
||||
await Task.WhenAll(tasks).ConfigureAwait(false);
|
||||
tasks.Clear();
|
||||
@@ -552,7 +552,10 @@ namespace MediaBrowser.Controller.Entities
|
||||
}
|
||||
else
|
||||
{
|
||||
tasks.Add(RefreshChildMetadata(child, refreshOptions, false, innerProgress, cancellationToken));
|
||||
// Avoid implicitly captured closure
|
||||
var taskChild = child;
|
||||
|
||||
tasks.Add(Task.Run(async () => await RefreshChildMetadata(taskChild, refreshOptions, false, innerProgress, cancellationToken).ConfigureAwait(false), cancellationToken));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -99,7 +99,7 @@ namespace MediaBrowser.Controller.Entities.Movies
|
||||
// Refresh songs
|
||||
foreach (var item in items)
|
||||
{
|
||||
if (tasks.Count >= 2)
|
||||
if (tasks.Count >= 4)
|
||||
{
|
||||
await Task.WhenAll(tasks).ConfigureAwait(false);
|
||||
tasks.Clear();
|
||||
@@ -123,7 +123,9 @@ namespace MediaBrowser.Controller.Entities.Movies
|
||||
}
|
||||
});
|
||||
|
||||
tasks.Add(RefreshItem(item, refreshOptions, innerProgress, cancellationToken));
|
||||
// Avoid implicitly captured closure
|
||||
var taskChild = item;
|
||||
tasks.Add(Task.Run(async () => await RefreshItem(taskChild, refreshOptions, innerProgress, cancellationToken).ConfigureAwait(false), cancellationToken));
|
||||
}
|
||||
|
||||
await Task.WhenAll(tasks).ConfigureAwait(false);
|
||||
|
||||
@@ -102,7 +102,11 @@ namespace MediaBrowser.Controller.Entities
|
||||
|
||||
public TrailerInfo GetLookupInfo()
|
||||
{
|
||||
return GetItemLookupInfo<TrailerInfo>();
|
||||
var info = GetItemLookupInfo<TrailerInfo>();
|
||||
|
||||
info.IsLocalTrailer = IsLocalTrailer;
|
||||
|
||||
return info;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
using MediaBrowser.Model.Logging;
|
||||
using System.Collections.Concurrent;
|
||||
using MediaBrowser.Model.Logging;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
@@ -19,7 +20,7 @@ namespace MediaBrowser.Controller.Providers
|
||||
{
|
||||
private readonly ILogger _logger;
|
||||
|
||||
private readonly Dictionary<string, List<FileSystemInfo>> _cache = new Dictionary<string, List<FileSystemInfo>>(StringComparer.OrdinalIgnoreCase);
|
||||
private readonly ConcurrentDictionary<string, List<FileSystemInfo>> _cache = new ConcurrentDictionary<string, List<FileSystemInfo>>(StringComparer.OrdinalIgnoreCase);
|
||||
|
||||
public DirectoryService(ILogger logger)
|
||||
{
|
||||
@@ -43,7 +44,7 @@ namespace MediaBrowser.Controller.Providers
|
||||
entries = new List<FileSystemInfo>();
|
||||
}
|
||||
|
||||
_cache.Add(path, entries);
|
||||
_cache.TryAdd(path, entries);
|
||||
}
|
||||
|
||||
return entries;
|
||||
|
||||
@@ -142,7 +142,7 @@ namespace MediaBrowser.Controller.Providers
|
||||
|
||||
public class TrailerInfo : ItemLookupInfo
|
||||
{
|
||||
|
||||
public bool IsLocalTrailer { get; set; }
|
||||
}
|
||||
|
||||
public class BookInfo : ItemLookupInfo
|
||||
|
||||
Reference in New Issue
Block a user