diff options
| author | Shadowghost <Ghost_of_Stone@web.de> | 2023-03-10 19:16:57 +0100 |
|---|---|---|
| committer | Shadowghost <Ghost_of_Stone@web.de> | 2023-03-10 19:16:57 +0100 |
| commit | 8d158df67856bbb9de696f5caa0ec475b172ced2 (patch) | |
| tree | 0fc3fbe554fe672ffbf93623311dc585429bb5f3 /Emby.Server.Implementations/Playlists/PlaylistManager.cs | |
| parent | 76ae599bd3ccfd9808f50dbf5d935aa430783e60 (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.cs | 14 |
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); + } + } } } |
