SQLite Edit or Curl API syntax help

Server Version#: 1.21.1.3876
Player Version#:NA

Okay I upgraded to the new Movie agent and had many posters changed on me. So I want to change over to using local media assets with artwork stored with my movie files. I did some testing and have the details worked out.

My problem is on my main 4000+ movie collection many of the (meta-items - user_fields - lockedFields) are set to lock the poster and fanart and local assets doesn’t bypass the lock)

So what I need to do is modify the value like (lockedFields=9|10|13|14) to remove the 9|10 but leave the rest of the values intact, in the example value resulting in (lockedFields=13|14)

I am no expert on SQLite but did make a few changes with DB Browser for SQLite but I am not sure it can do the change I want for the entire section of the database.

I also downed loaded sqlite-tools for windows. I assume this can be done from CMD with this tool. But I could really use some help with the CMD line instructions? Any help is appreciated.

Check these out -

If you want to do it in sqlite, check out the REPLACE() function, but be sure to take a DB backup first, and be careful not to over-match and replace the wrong things.

1 Like

Now I am trying to use curl on Ubuntu:

curl -X PUT “https://(CUSTOM SERVER URL)/library/sections/1/all?type=9&poster.locked=0&X-Plex-Token=XXXXX”

XXXXX replaced by token

But poster was just a guess … I can’t find the syntax for what would unlock all posters and then for fanart?? My server is running behind a reverse proxy, do I need to include port 443? I am now sort of lost on this method. It does seem safer.

Okay I tracked down the solution:

curl -X PUT “https://(CUSTOM SERVER URL)/library/sections/1/all?type=1&thumb.locked=0&X-Plex-Token=XXXXX”

curl -X PUT “https://(CUSTOM SERVER URL)/library/sections/1/all?type=1&art.locked=0&X-Plex-Token=XXXXX”

I guess “thumb” is for Posters and “art” is for Backgrounds.

1 Like

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.