aboutsummaryrefslogtreecommitdiff
path: root/Jellyfin.Api/Controllers/SearchController.cs
diff options
context:
space:
mode:
Diffstat (limited to 'Jellyfin.Api/Controllers/SearchController.cs')
-rw-r--r--Jellyfin.Api/Controllers/SearchController.cs3
1 files changed, 2 insertions, 1 deletions
diff --git a/Jellyfin.Api/Controllers/SearchController.cs b/Jellyfin.Api/Controllers/SearchController.cs
index 6ffedccbd..07e113ad3 100644
--- a/Jellyfin.Api/Controllers/SearchController.cs
+++ b/Jellyfin.Api/Controllers/SearchController.cs
@@ -6,6 +6,7 @@ using System.Linq;
using Jellyfin.Api.Constants;
using Jellyfin.Api.ModelBinders;
using Jellyfin.Data.Enums;
+using Jellyfin.Extensions;
using MediaBrowser.Controller.Drawing;
using MediaBrowser.Controller.Dto;
using MediaBrowser.Controller.Entities;
@@ -187,7 +188,7 @@ namespace Jellyfin.Api.Controllers
result.AlbumArtist = album.AlbumArtist;
break;
case Audio song:
- result.AlbumArtist = song.AlbumArtists?[0];
+ result.AlbumArtist = song.AlbumArtists?.FirstOrDefault();
result.Artists = song.Artists;
MusicAlbum musicAlbum = song.AlbumEntity;