|
|
@ -152,10 +152,10 @@ namespace Emby.Server.Implementations.Playlists
|
|
|
|
|
|
|
|
|
|
|
|
if (options.ItemIdList.Length > 0)
|
|
|
|
if (options.ItemIdList.Length > 0)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
AddToPlaylistInternal(playlist.Id.ToString("N", CultureInfo.InvariantCulture), options.ItemIdList, user, new DtoOptions(false)
|
|
|
|
await AddToPlaylistInternal(playlist.Id, options.ItemIdList, user, new DtoOptions(false)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
EnableImages = true
|
|
|
|
EnableImages = true
|
|
|
|
});
|
|
|
|
}).ConfigureAwait(false);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
return new PlaylistCreationResult(playlist.Id.ToString("N", CultureInfo.InvariantCulture));
|
|
|
|
return new PlaylistCreationResult(playlist.Id.ToString("N", CultureInfo.InvariantCulture));
|
|
|
@ -184,7 +184,7 @@ namespace Emby.Server.Implementations.Playlists
|
|
|
|
return Playlist.GetPlaylistItems(playlistMediaType, items, user, options);
|
|
|
|
return Playlist.GetPlaylistItems(playlistMediaType, items, user, options);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public Task AddToPlaylistAsync(string playlistId, ICollection<Guid> itemIds, Guid userId)
|
|
|
|
public Task AddToPlaylistAsync(Guid playlistId, ICollection<Guid> itemIds, Guid userId)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
var user = userId.Equals(Guid.Empty) ? null : _userManager.GetUserById(userId);
|
|
|
|
var user = userId.Equals(Guid.Empty) ? null : _userManager.GetUserById(userId);
|
|
|
|
|
|
|
|
|
|
|
@ -194,7 +194,7 @@ namespace Emby.Server.Implementations.Playlists
|
|
|
|
});
|
|
|
|
});
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
private async Task AddToPlaylistInternal(string playlistId, ICollection<Guid> newItemIds, User user, DtoOptions options)
|
|
|
|
private async Task AddToPlaylistInternal(Guid playlistId, ICollection<Guid> newItemIds, User user, DtoOptions options)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
// Retrieve the existing playlist
|
|
|
|
// Retrieve the existing playlist
|
|
|
|
var playlist = _libraryManager.GetItemById(playlistId) as Playlist
|
|
|
|
var playlist = _libraryManager.GetItemById(playlistId) as Playlist
|
|
|
|