aboutsummaryrefslogtreecommitdiff
path: root/Emby.Server.Implementations/Playlists/PlaylistManager.cs
diff options
context:
space:
mode:
authorShadowghost <Ghost_of_Stone@web.de>2023-03-10 19:16:57 +0100
committerShadowghost <Ghost_of_Stone@web.de>2023-03-10 19:16:57 +0100
commit8d158df67856bbb9de696f5caa0ec475b172ced2 (patch)
tree0fc3fbe554fe672ffbf93623311dc585429bb5f3 /Emby.Server.Implementations/Playlists/PlaylistManager.cs
parent76ae599bd3ccfd9808f50dbf5d935aa430783e60 (diff)
Add migration to properly set playlist owner
Diffstat (limited to 'Emby.Server.Implementations/Playlists/PlaylistManager.cs')
-rw-r--r--Emby.Server.Implementations/Playlists/PlaylistManager.cs14
1 files changed, 14 insertions, 0 deletions
diff --git a/Emby.Server.Implementations/Playlists/PlaylistManager.cs b/Emby.Server.Implementations/Playlists/PlaylistManager.cs
index 8cba652e7..c15c2c400 100644
--- a/Emby.Server.Implementations/Playlists/PlaylistManager.cs
+++ b/Emby.Server.Implementations/Playlists/PlaylistManager.cs
@@ -563,5 +563,19 @@ namespace Emby.Server.Implementations.Playlists
}
}
}
+
+ public async Task UpdatePlaylist(Playlist playlist)
+ {
+ var currentPlaylist = (Playlist)_libraryManager.GetItemById(playlist.Id);
+ currentPlaylist.OwnerUserId = playlist.OwnerUserId;
+ currentPlaylist.Shares = playlist.Shares;
+
+ await playlist.UpdateToRepositoryAsync(ItemUpdateType.MetadataEdit, CancellationToken.None).ConfigureAwait(false);
+
+ if (playlist.IsFile)
+ {
+ SavePlaylistFile(currentPlaylist);
+ }
+ }
}
}