Velvet Star Monitor

Standout celebrity highlights with iconic style.

general

Problems deleting song from jellyfin playlist by API call

Writer Emily Wong

I'm trying to delete a song from a jellyfin playlist by an API call. I use following DELETE request: When I execute this, the song doesn't get removed from the playlist and I get return code 204.

If I look in devtools network window and perform the action manually, I get the same request except for the api_key parameter.

When I perform the task manually, the song gets removed from the playlist. What am I missing here?

Another method I tried was editing the playlist xml file in /var/lib/jellyfin/data/playlists but that didn't seem to do anything either...

All other API calls work (including deleting a playlist). I already looked with wireshark and jellyfin actually receives the DELETE request.

I'm using Jellyfin version 10.8.8
OS: Linux
Architecture: Arm64

I found the following in the logs. Maybe this has something to do with it but I don't really know how i could fix this.

[2022-12-30 10:13:39.960 +00:00] [ERR] Error in metadata saver
System.IO.IOException: The process cannot access the file '/var/lib/jellyfin/data/playlists/Actief/playlist.xml' because it is being used by another process. at Microsoft.Win32.SafeHandles.SafeFileHandle.Init(String path, FileMode mode, FileAccess access, FileShare share, FileOptions options, Int64 preallocationSize) at Microsoft.Win32.SafeHandles.SafeFileHandle.Open(String fullPath, FileMode mode, FileAccess access, FileShare share, FileOptions options, Int64 preallocationSize) at System.IO.Strategies.OSFileStreamStrategy..ctor(String path, FileMode mode, FileAccess access, FileShare share, FileOptions options, Int64 preallocationSize) at System.IO.Strategies.FileStreamHelpers.ChooseStrategy(FileStream fileStream, String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options, Int64 preallocationSize) at System.IO.FileStream..ctor(String path, FileStreamOptions options) at MediaBrowser.LocalMetadata.Savers.BaseXmlSaver.SaveAsync(BaseItem item, CancellationToken cancellationToken) at MediaBrowser.Providers.Manager.ProviderManager.SaveMetadataAsync(BaseItem item, ItemUpdateType updateType, IEnumerable`1 savers)
1

1 Answer

Found the solution. I was working with the songId but had to use PlaylistItemId's

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.