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 147 times)

seansimpson

  • Recent member
  • *
  • Posts: 6
Need help with SetInfo API
« on: Yesterday 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: 42744
  • Shoes gone again!
Re: Need help with SetInfo API
« Reply #1 on: Yesterday 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: Yesterday 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: 42744
  • Shoes gone again!
Re: Need help with SetInfo API
« Reply #3 on: Yesterday 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

seansimpson

  • Recent member
  • *
  • Posts: 6
Re: Need help with SetInfo API
« Reply #4 on: Today at 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.
Logged

seansimpson

  • Recent member
  • *
  • Posts: 6
Re: Need help with SetInfo API
« Reply #5 on: Today at 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?
Logged

Awesome Donkey

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 8194
  • The color of Spring!
Re: Need help with SetInfo API
« Reply #6 on: Today at 11:55:07 am »

You'd have to wait for MC34 to be released.
Logged
I don't work for JRiver... I help keep the forums safe from "male enhancements" and other sources of sketchy pharmaceuticals.

Windows 11 24H2 Update 64-bit + Ubuntu 24.10 Oracular Oriole 64-bit (AMD 7900X CPU/AMD 7800 XT GPU/64GB RAM/2TB M.2 NVMe SSD)
macOS Sequoia 15.3.2 (M4 Mac Mini 16GB RAM/256GB SSD)
Windows 11 24H2 Update 64-bit (Intel N305 Fanless NUC 16GB RAM/500GB M.2 NVMe SSD)
JRiver Media Center 33 (Windows + Mac + Linux) | iFi ZEN DAC 3 | JBL 306P MkII Studio Monitors | Audio-Technica ATH-M50x Headphones
Pages: [1]   Go Up