diff --git a/Jellyfin.Plugin.YandexMusic/AlbumArtistTask.cs b/Jellyfin.Plugin.YandexMusic/AlbumArtistTask.cs
index 7872b69..5bb07f1 100644
--- a/Jellyfin.Plugin.YandexMusic/AlbumArtistTask.cs
+++ b/Jellyfin.Plugin.YandexMusic/AlbumArtistTask.cs
@@ -1,39 +1,43 @@
using Jellyfin.Data.Enums;
using Jellyfin.Plugin.YandexMusic.Providers;
+using MediaBrowser.Controller.Dto;
using MediaBrowser.Controller.Entities;
using MediaBrowser.Controller.Entities.Audio;
using MediaBrowser.Controller.Library;
+using MediaBrowser.Model.Dto;
using MediaBrowser.Model.Tasks;
using Microsoft.Extensions.Logging;
namespace Jellyfin.Plugin.YandexMusic;
///
-/// Fills the AlbumArtists field for existing audio items. Jellyfin's Audio metadata merge
-/// ignores this field, which is why artist and album pages stay empty.
+/// Repairs music metadata links after a Jellyfin 10 -> 12 migration:
+/// fills AlbumArtists, writes Artists/Genres into the new item-value tables and creates person links.
///
public class AlbumArtistTask : IScheduledTask
{
private readonly ILibraryManager _libraryManager;
+ private readonly IDtoService _dtoService;
private readonly ILogger _logger;
///
/// Initializes a new instance of the class.
///
- public AlbumArtistTask(ILibraryManager libraryManager, ILogger logger)
+ public AlbumArtistTask(ILibraryManager libraryManager, IDtoService dtoService, ILogger logger)
{
_libraryManager = libraryManager;
+ _dtoService = dtoService;
_logger = logger;
}
///
- public string Name => "Yandex Music: создать исполнителей";
+ public string Name => "Yandex Music: исправить исполнителей и жанры";
///
public string Key => "YandexMusicAlbumArtists";
///
- public string Description => "Заполняет AlbumArtists и связи исполнителей, чтобы Jellyfin создал страницы исполнителей.";
+ public string Description => "Переносит исполнителей, альбомных исполнителей и жанры в новую модель Jellyfin 12 и создаёт связи артистов.";
///
public string Category => "Yandex Music";
@@ -48,50 +52,63 @@ public class AlbumArtistTask : IScheduledTask
IsVirtualItem = false
}).OfType