The Free Software Media System - Server Backend & API
make sure theme song owner id is correct
Luke Pulverentie1fb68b70c6e
diff --git a/MediaBrowser.Api/LibraryService.cs b/MediaBrowser.Api/LibraryService.csindex 2e9ea6cebe..582eb6f497 100644--- a/MediaBrowser.Api/LibraryService.cs+++ b/MediaBrowser.Api/LibraryService.cs@@ -615,9 +615,15 @@ namespace MediaBrowser.Apiif (album != null){- themeSongIds = album.SoundtrackIds- .SelectMany(i => _libraryManager.GetItemById(i).ThemeSongIds)- .ToList();+ var linkedItemWithThemes = album.SoundtrackIds+ .Select(i => _libraryManager.GetItemById(i))+ .FirstOrDefault(i => i.ThemeSongIds.Count > 0);++ if (linkedItemWithThemes != null)+ {+ themeSongIds = linkedItemWithThemes.ThemeSongIds;+ item = linkedItemWithThemes;+ }}}@@ -677,9 +683,15 @@ namespace MediaBrowser.Apiif (album != null){- themeVideoIds = album.SoundtrackIds- .SelectMany(i => _libraryManager.GetItemById(i).ThemeVideoIds)- .ToList();+ var linkedItemWithThemes = album.SoundtrackIds+ .Select(i => _libraryManager.GetItemById(i))+ .FirstOrDefault(i => i.ThemeVideoIds.Count > 0);++ if (linkedItemWithThemes != null)+ {+ themeVideoIds = linkedItemWithThemes.ThemeVideoIds;+ item = linkedItemWithThemes;+ }}}