Răsfoiți Sursa

Merge pull request #12037 from Shadowghost/fix-user-delete

Do not fail user deletion if we have no playlist folder
Bond-009 1 an în urmă
părinte
comite
d90f504ca7

+ 6 - 1
Emby.Server.Implementations/Playlists/PlaylistManager.cs

@@ -170,8 +170,13 @@ namespace Emby.Server.Implementations.Playlists
         private List<Playlist> GetUserPlaylists(Guid userId)
         {
             var user = _userManager.GetUserById(userId);
+            var playlistsFolder = GetPlaylistsFolder(userId);
+            if (playlistsFolder is null)
+            {
+                return [];
+            }
 
-            return GetPlaylistsFolder(userId).GetChildren(user, true).OfType<Playlist>().ToList();
+            return playlistsFolder.GetChildren(user, true).OfType<Playlist>().ToList();
         }
 
         private static string GetTargetPath(string path)