All media items in Plex have metadata that is displayed when viewing the item in Plex. This information can be found either locally on the Plex server or downloaded from the Internet.
You should refresh the metadata for a library if one of the following has occurred:
- The library metadata agent has changed.
- Added local media assets, such as artwork, theme music, subtitle files, etc.
- Wanted to update the posters, summary or other information for the media
- Media items are missing posters or information.
This command will refresh the metadata for all items in a library.
GET http://[IP address]:32400/library/sections/[Library ID]/refresh?force=[Force]&X-Plex-Token=[PlexToken]
|IP address||The IP address of the Plex Media server.|
|PlexToken||The temporary authentication Plex token.|
|Library ID||The key associated with the library. This key can be found by calling the Libraries API command.|
|Force||A flag indicating if the API command will refresh the metdata for all items regardless of any changes. 1 for forcing the refresh, otherwise 0|
|200||Success - The request was successful.|
|401||Unauthorized - The Plex token provided was not valid.|
No response is returned. You will be able to see the refresh metadata API command run from the Plex console.
When the force parameter is set to 1, all metadata for all items in library will be refreshed, regardless of whether the metadata needed to be refreshed. By setting the force parameter to 0, only items with missing metadata will be refreshed.
Setting the force parameter to 1 can cause more processing by the Plex server, and take much longer to run. When running the Refresh All Metadata from the Plex Web app, the force value is set to 1.
Force the refresh of the metadata for all media items in the library associated with ID 2 for the Plex server located at IP address of 192.168.1.4:
Only refresh the missing or incorrect metadata for media items in the library associated with ID 2 for the Plex server located at IP address of 192.168.1.4: