INTERACT FORUM

Please login or register.

Login with username, password and session length
Advanced search  
Pages: [1]   Go Down

Author Topic: Need help with SetInfo API  (Read 59 times)

seansimpson

  • Member
  • *
  • Posts: 4
Need help with SetInfo API
« on: Today at 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.
Logged

Matt

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 42742
  • Shoes gone again!
Re: Need help with SetInfo API
« Reply #1 on: Today at 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?
Logged
Matt Ashland, JRiver Media Center

MrBiff

  • World Citizen
  • ***
  • Posts: 152
Re: Need help with SetInfo API
« Reply #2 on: Today at 12:44:50 pm »

When you are updating the Filename (aka Location) field, make your calls using the File ID, not Filepath.
Logged

Matt

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 42742
  • Shoes gone again!
Re: Need help with SetInfo API
« Reply #3 on: Today at 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 :)
Logged
Matt Ashland, JRiver Media Center
Pages: [1]   Go Up