INTERACT FORUM

Mac => JRiver Media Center 33 for Mac => Topic started by: seansimpson on April 01, 2025, 10:47:23 am

Title: Need help with SetInfo API
Post by: seansimpson on April 01, 2025, 10:47:23 am
I have written a script to copy audio/video files from it's original location to a preferred location, while updating the filename to remove non-printing characters, spaces, etc.  Final step is to use the SetInfo endpoint to update the location in the MediaCenter Database.  I'm getting the following error:

Media Center encountered errors while tagging or moving files. Check that the files exist, are not read-only, and are not in use by other programs.

Tagging error: /Users/sean/Pictures/ikigai.jpeg
Tagging error: /Volumes/ELITE SE880/iTunes2/iTunes Library.itl

Those are the original locations, where MC has already imported the library from, so it reads these files all the time.  Why would a note about "moving" files exist?  I  know it is  possible to move a library through the MC UI, but that won't change the actual filenames as I want to.
Title: Re: Need help with SetInfo API
Post by: Matt on April 01, 2025, 11:03:05 am
That's going to flag the file as dirty and try moving from the old filename to the new filename. It maybe needs a way on the SetInfo call to tell it to not make the file dirty?
Title: Re: Need help with SetInfo API
Post by: MrBiff on April 01, 2025, 12:44:50 pm
When you are updating the Filename (aka Location) field, make your calls using the File ID, not Filepath.
Title: Re: Need help with SetInfo API
Post by: Matt on April 01, 2025, 12:56:44 pm
This brought up a good point, so MC34 will have this:
NEW: Added a "Dirty" flag to MCWS SetInfo so a file can be changed without flagging as dirty (which moves and tags the file).

Thanks for the help :)
Title: Re: Need help with SetInfo API
Post by: seansimpson on April 02, 2025, 11:35:03 am
When you are updating the Filename (aka Location) field, make your calls using the File ID, not Filepath.

I do use the file id.
Title: Re: Need help with SetInfo API
Post by: seansimpson on April 02, 2025, 11:36:23 am
I do use the file id.

Is there a way to do this before the next release?  Or will I have to wait?
Title: Re: Need help with SetInfo API
Post by: Awesome Donkey on April 02, 2025, 11:55:07 am
You'd have to wait for MC34 to be released.