Release 1.0.0.5: artist people links

This commit is contained in:
1xDed committed 2026-11-27 19:53:03 +03:00
1 parent 0dbf427ce1
commit 230616e4fc
8 files changed
+55 -12

No files matched your search

+26 -2
View File
@@ -27,13 +27,13 @@ public class AlbumArtistTask : IScheduledTask
}
/// <inheritdoc />
public string Name => "Yandex Music: заполнить исполнителей альбомов";
public string Name => "Yandex Music: создать исполнителей";
/// <inheritdoc />
public string Key => "YandexMusicAlbumArtists";
/// <inheritdoc />
public string Description => "Заполняет AlbumArtists у треков, чтобы Jellyfin создал исполнителей и альбомы.";
public string Description => "Заполняет AlbumArtists и связи исполнителей, чтобы Jellyfin создал страницы исполнителей.";
/// <inheritdoc />
public string Category => "Yandex Music";
@@ -75,6 +75,30 @@ public class AlbumArtistTask : IScheduledTask
updated++;
}
var people = new List<MediaBrowser.Controller.Entities.PersonInfo>();
foreach (var name in item.AlbumArtists)
{
people.Add(new MediaBrowser.Controller.Entities.PersonInfo
{
Name = name,
Type = Jellyfin.Data.Enums.PersonKind.AlbumArtist
});
}
foreach (var name in item.Artists)
{
people.Add(new MediaBrowser.Controller.Entities.PersonInfo
{
Name = name,
Type = Jellyfin.Data.Enums.PersonKind.Artist
});
}
if (people.Count > 0)
{
await _libraryManager.UpdatePeopleAsync(item, people, cancellationToken).ConfigureAwait(false);
}
progress.Report(100.0 * (i + 1) / Math.Max(1, items.Count));
}
@@ -1,9 +1,9 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<Version>1.0.0.4</Version>
<AssemblyVersion>1.0.0.4</AssemblyVersion>
<FileVersion>1.0.0.4</FileVersion>
<Version>1.0.0.5</Version>
<AssemblyVersion>1.0.0.5</AssemblyVersion>
<FileVersion>1.0.0.5</FileVersion>
<TargetFramework>net10.0</TargetFramework>
<RootNamespace>Jellyfin.Plugin.YandexMusic</RootNamespace>
<AssemblyName>Jellyfin.Plugin.YandexMusic</AssemblyName>
@@ -91,6 +91,25 @@ public class YandexMusicSongProvider : IRemoteMetadataProvider<Audio, SongInfo>,
audio.Artists = artistNames;
audio.AlbumArtists = albumArtistNames;
foreach (var name in artistNames)
{
result.AddPerson(new MediaBrowser.Controller.Entities.PersonInfo
{
Name = name,
Type = Jellyfin.Data.Enums.PersonKind.Artist
});
}
foreach (var name in albumArtistNames)
{
result.AddPerson(new MediaBrowser.Controller.Entities.PersonInfo
{
Name = name,
Type = Jellyfin.Data.Enums.PersonKind.AlbumArtist
});
}
AlbumArtistCache.Set(info.Path, albumArtistNames);
audio.Album = config.UseYandexAlbumName
? album?.Title ?? info.Album