# SQLite Edit or Curl API syntax help

**URL:** <https://forums.plex.tv/t/sqlite-edit-or-curl-api-syntax-help/680657>\
**Category:** Plex Media Server\
**Tags:** server-windows\
**Created:** [January 20, 2021, 10:17pm UTC](https://forums.plex.tv/t/sqlite-edit-or-curl-api-syntax-help/680657 "2021-01-20T22:17:47Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![Volts](https://avatars.discourse-cdn.com/v4/letter/v/a5b964/32.png) [@Volts](https://forums.plex.tv/u/Volts)\
**Post date:** [January 20, 2021, 10:23pm UTC](https://forums.plex.tv/t/sqlite-edit-or-curl-api-syntax-help/680657/2 "2021-01-20T22:23:19Z")

</div>

Check these out -

> [@New Music Metadata handling](https://forums.plex.tv/t/new-music-metadata-handling/469988/10):
>
> Ahh, gotcha. There unfortunately no way to do that in the GUI. But of course you can edit your database directly and remove those locks on all items in one sweep. If you have access to the curl command or have an equivalent way of sending commands per http to your server, here is a sequence of commands to unlock them all. First you need to determine the library ID of your music library. You can get it from the [Plex XML info](https://support.plex.tv/hc/en-us/articles/201998867-Investigate-Media-Information-and-Formats "Plex XML info") of one of the music tracks (or by simply hovering the mouse cursor o…

> [@PMS revert back to old rating from stars](https://forums.plex.tv/t/pms-revert-back-to-old-rating-from-stars/636132/63):
>
> Manual changes to rating (critic ratings) are overwritten by Plex when metadata is refreshed This can be prevented by locking the field. The list of locked fields is stored in metadata\_items.user\_fields. The rating (critic ratings) field is index 5, so metadata\_items.user\_fields is set to lockedFields=5 when locked. If multiple fields are locked they are separated with a |. lockedFields=2|5|7. The audience\_rating field is index 30. To lock critic and audience, use lockedFields=5|30. I was g…

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.

---

_[View the full topic](https://forums.plex.tv/t/sqlite-edit-or-curl-api-syntax-help/680657)._
