From 0dbf427ce1c79aa49fc7f545ae97079e67c5f07b Mon Sep 17 00:00:00 2001 From: 1xDed Date: Fri, 27 Nov 2026 19:38:01 +0300 Subject: [PATCH] Release 1.0.0.4: album artists, credits, artist genres, maintenance task --- .../AlbumArtistTask.cs | 86 ++++++++++++++++++ .../Configuration/PluginConfiguration.cs | 5 + .../Configuration/configPage.html | 8 ++ .../Jellyfin.Plugin.YandexMusic.csproj | 6 +- .../Providers/AlbumArtistCache.cs | 36 ++++++++ .../Providers/Mapping.cs | 56 ++++++++++++ .../Providers/YandexMusicAlbumProvider.cs | 6 +- .../YandexMusicAudioCustomProvider.cs | 39 ++++++++ .../Providers/YandexMusicSongProvider.cs | 22 ++++- .../Yandex/YandexModels.cs | 24 +++++ .../Yandex/YandexMusicClient.cs | 34 +++++++ build.yaml | 4 +- dist/Jellyfin.Plugin.YandexMusic_1.0.0.3.zip | Bin 83472 -> 0 bytes dist/Jellyfin.Plugin.YandexMusic_1.0.0.4.zip | Bin 0 -> 88431 bytes dist/manifest.json | 10 +- scripts/package.sh | 2 +- tests/YandexSmoke/Program.cs | 8 ++ 17 files changed, 332 insertions(+), 14 deletions(-) create mode 100644 Jellyfin.Plugin.YandexMusic/AlbumArtistTask.cs create mode 100644 Jellyfin.Plugin.YandexMusic/Providers/AlbumArtistCache.cs create mode 100644 Jellyfin.Plugin.YandexMusic/Providers/YandexMusicAudioCustomProvider.cs delete mode 100644 dist/Jellyfin.Plugin.YandexMusic_1.0.0.3.zip create mode 100644 dist/Jellyfin.Plugin.YandexMusic_1.0.0.4.zip diff --git a/Jellyfin.Plugin.YandexMusic/AlbumArtistTask.cs b/Jellyfin.Plugin.YandexMusic/AlbumArtistTask.cs new file mode 100644 index 0000000..e771c30 --- /dev/null +++ b/Jellyfin.Plugin.YandexMusic/AlbumArtistTask.cs @@ -0,0 +1,86 @@ +using Jellyfin.Data.Enums; +using Jellyfin.Plugin.YandexMusic.Providers; +using MediaBrowser.Controller.Entities; +using MediaBrowser.Controller.Entities.Audio; +using MediaBrowser.Controller.Library; +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. +/// +public class AlbumArtistTask : IScheduledTask +{ + private readonly ILibraryManager _libraryManager; + private readonly ILogger _logger; + + /// + /// Initializes a new instance of the class. + /// + public AlbumArtistTask(ILibraryManager libraryManager, ILogger logger) + { + _libraryManager = libraryManager; + _logger = logger; + } + + /// + public string Name => "Yandex Music: заполнить исполнителей альбомов"; + + /// + public string Key => "YandexMusicAlbumArtists"; + + /// + public string Description => "Заполняет AlbumArtists у треков, чтобы Jellyfin создал исполнителей и альбомы."; + + /// + public string Category => "Yandex Music"; + + /// + public async Task ExecuteAsync(IProgress progress, CancellationToken cancellationToken) + { + var items = _libraryManager.GetItemList(new InternalItemsQuery + { + Recursive = true, + IncludeItemTypes = [BaseItemKind.Audio], + IsVirtualItem = false + }).OfType