INTERACT FORUM
More => Old Versions => JRiver Media Center 28 for Windows => Topic started by: zybex on November 24, 2021, 11:36:16 am
-
Hi team,
While using MCWS API to process files in bulk I ran into some limitations. Could you please consider adding these functions:
Playlist\Clear
Purpose: remove all files from a playlist without deleting the playlist.
Reason: I need to recreate playlists from scratch, without changing their ID so that existing Views/Expressions/Playlists that rely on the ID keep working. Deleting and recreating a playlist is fast, but the ID changes.
Playlist\AddFiles
Purpose: add a list of files (by key list) to an existing playlist
Reason: this avoids having to do 1000 API calls to add 1000 files. Playlist\Build can do that, but only when creating a new list. Also, when creating a new list with a few thousand files it's not possible to add them all in a single go as the URL would exceed the maximum length. So this new Playlist\AddFiles would allow creating large lists in batches.
Playlist\RemoveFiles
Purpose: the complement to AddFiles above.
Thank you, and happy thanksgiving!
-
I agree with your ideas. I'll try to hook it up sometime in the future. Thanks.
-
Coming next build:
NEW: Added the MCWS function Playlist/AddFiles.
NEW: Added the MCWS function Playlist/Clear.
NEW: Added the MCWS function Playlist/RemoveFiles.
Thanks for the suggesion.
-
Thanks. Looking forward to this.
Sytax help with adding only the currently playing track to a specific playlist ID would be appreciated.
-
Get the key of the currently playing file from any of the Info commands, and use the new Playlist/AddFiles command to add it to one. Seems pretty straight forward.
-
Thanks again Matt!
Just remembered a useful parameter to AddFiles, perhaps you thought of it too: &allowdups=0 to remove duplicates; default is 1 to allow duplicates (or vice versa, up to you).
Alternative solutions:
/playlist/clear&dupsonly=1
/playlist/cleardups
-
We'll do this to avoid function pollution:
NEW: Added the MCWS function Playlist/RemoveDuplicates.
-
I was successful using Playlist/Addfile
Thanks for this nice enhancement! ;D