mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-06-02 22:08:27 +01:00
update audio sync params
This commit is contained in:
@@ -9,6 +9,7 @@ using MediaBrowser.Model.Serialization;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using MediaBrowser.Controller.Library;
|
||||
using MediaBrowser.Model.Dto;
|
||||
|
||||
namespace MediaBrowser.Controller.Entities.Audio
|
||||
{
|
||||
@@ -227,7 +228,39 @@ namespace MediaBrowser.Controller.Entities.Audio
|
||||
// Refresh current item
|
||||
await RefreshMetadata(parentRefreshOptions, cancellationToken).ConfigureAwait(false);
|
||||
|
||||
if (!refreshOptions.IsAutomated)
|
||||
{
|
||||
await RefreshArtists(refreshOptions, cancellationToken).ConfigureAwait(false);
|
||||
}
|
||||
|
||||
progress.Report(100);
|
||||
}
|
||||
|
||||
private async Task RefreshArtists(MetadataRefreshOptions refreshOptions, CancellationToken cancellationToken)
|
||||
{
|
||||
var artists = AllArtists.Select(i =>
|
||||
{
|
||||
// This should not be necessary but we're seeing some cases of it
|
||||
if (string.IsNullOrWhiteSpace(i))
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
var artist = LibraryManager.GetArtist(i);
|
||||
|
||||
if (!artist.IsAccessedByName)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
return artist;
|
||||
|
||||
}).Where(i => i != null).ToList();
|
||||
|
||||
foreach (var artist in artists)
|
||||
{
|
||||
await artist.RefreshMetadata(refreshOptions, cancellationToken).ConfigureAwait(false);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user