fix!: don't share playlists with other users.

This commit is contained in:
redxef 2024-10-30 15:20:33 +01:00
parent eb7ab00ea2
commit 7ce5f673e1
Signed by: redxef
GPG key ID: 7DAC3AA211CBD921

View file

@ -12,6 +12,7 @@ using System.Threading;
using System.Threading.Tasks;
using Jellyfin.Data.Entities;
using Jellyfin.Data.Enums;
using MediaBrowser.Model.Entities;
using MediaBrowser.Controller;
using MediaBrowser.Controller.Entities;
using MediaBrowser.Controller.Library;
@ -93,9 +94,12 @@ namespace Jellyfin.Plugin.SmartPlaylist.ScheduledTasks {
}
private SmartPlaylistId CreateNewPlaylist(string name, UserId userId) {
_logger.LogDebug("Creating playlist '{0}'", name);
var req = new PlaylistCreationRequest {
Name = name,
UserId = userId,
Users = [new PlaylistUserPermissions(userId)],
Public = false,
};
var playlistGuid = Guid.Parse(_playlistManager.CreatePlaylist(req).Result.Id);
return playlistGuid;