aboutsummaryrefslogtreecommitdiff
path: root/Emby.Server.Implementations
diff options
context:
space:
mode:
Diffstat (limited to 'Emby.Server.Implementations')
-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);
+ }
+ }
}
}