From fe79384cd50584ffd55f494c8e88df59ca5acdc1 Mon Sep 17 00:00:00 2001
From: JQ <81431263+scampower3@users.noreply.github.com>
Date: Mon, 7 Apr 2025 04:18:39 +0800
Subject: [PATCH] Returns album artists apart from artist names when doing a
lyrics search (#13852)
---
MediaBrowser.Model/Lyrics/LyricSearchRequest.cs | 7 ++++++-
MediaBrowser.Providers/Lyric/LyricManager.cs | 3 ++-
MediaBrowser.Providers/Lyric/LyricScheduledTask.cs | 3 ++-
3 files changed, 10 insertions(+), 3 deletions(-)
diff --git a/MediaBrowser.Model/Lyrics/LyricSearchRequest.cs b/MediaBrowser.Model/Lyrics/LyricSearchRequest.cs
index 48c442a55e..67f3d7b42c 100644
--- a/MediaBrowser.Model/Lyrics/LyricSearchRequest.cs
+++ b/MediaBrowser.Model/Lyrics/LyricSearchRequest.cs
@@ -15,7 +15,12 @@ public class LyricSearchRequest : IHasProviderIds
public string? MediaPath { get; set; }
///
- /// Gets or sets the artist name.
+ /// Gets or sets the album artist names.
+ ///
+ public IReadOnlyList? AlbumArtistsNames { get; set; }
+
+ ///
+ /// Gets or sets the artist names.
///
public IReadOnlyList? ArtistNames { get; set; }
diff --git a/MediaBrowser.Providers/Lyric/LyricManager.cs b/MediaBrowser.Providers/Lyric/LyricManager.cs
index f4b18a8c14..913a104a0d 100644
--- a/MediaBrowser.Providers/Lyric/LyricManager.cs
+++ b/MediaBrowser.Providers/Lyric/LyricManager.cs
@@ -78,7 +78,8 @@ public class LyricManager : ILyricManager
MediaPath = audio.Path,
SongName = audio.Name,
AlbumName = audio.Album,
- ArtistNames = audio.GetAllArtists().ToList(),
+ AlbumArtistsNames = audio.AlbumArtists,
+ ArtistNames = audio.Artists,
Duration = audio.RunTimeTicks,
IsAutomated = isAutomated
};
diff --git a/MediaBrowser.Providers/Lyric/LyricScheduledTask.cs b/MediaBrowser.Providers/Lyric/LyricScheduledTask.cs
index 73912b5796..b8861ee5ec 100644
--- a/MediaBrowser.Providers/Lyric/LyricScheduledTask.cs
+++ b/MediaBrowser.Providers/Lyric/LyricScheduledTask.cs
@@ -117,7 +117,8 @@ public class LyricScheduledTask : IScheduledTask
MediaPath = audioItem.Path,
SongName = audioItem.Name,
AlbumName = audioItem.Album,
- ArtistNames = audioItem.GetAllArtists().ToList(),
+ AlbumArtistsNames = audioItem.AlbumArtists,
+ ArtistNames = audioItem.Artists,
Duration = audioItem.RunTimeTicks,
IsAutomated = true,
DisabledLyricFetchers = libraryOptions.DisabledLyricFetchers,