Update Media Play Progress
This API command can be used to update the play progress of a media item.
URL
PUT http://{ip_address}:32400/:/progress?key={id}&identifier=com.plexapp.plugins.library&time={time}&state={state}&X-Plex-Token={plex_token}
Parameters
Name | Description |
---|---|
ip_address | The IP address of the Plex Media server. |
plex_token | The Plex token. |
id | The key associated with the media item. |
time | The time, in milliseconds, used to set the media playback progress. |
state | The playback state of the media item. |
Return Status
HTTP Code | Description |
---|---|
200 | Success - The request was successful. |
400 | Bad Request - A parameter was not specified, or was specified incorrectly. |
401 | Unauthorized - The Plex token provided was not valid. |
Response
No response is returned when a session is terminated. Check for a return status code of 200 to determine if the API call was successful.
Remarks
Progress time value
For the time
parameter value, the value must be one millisecond above the minimum progress time. By default, the minimum progress time in Plex is 60000 milliseconds (1 minute), so the lowest value for the time
parameter is 60001.
The minimum progress time value can be changed within the hidden settings with the minimumProgressTime
setting.
State value
To mark the progress time for an item, set the state
parameter value to "stopped".
Examples
curl -X PUT http://{ip_address}:32400/:/progress?key={id}&identifier=com.plexapp.plugins.library&time={time}&state={state}&X-Plex-Token={plex_token}
import requests plex_url = http://{ip_address}:32400/:/progress?key={id}&identifier=com.plexapp.plugins.library&time={time}&state={state}&X-Plex-Token={plex_token} response = requests.put(plex_url) print(response.text)
$response = Invoke-RestMethod 'http://{ip_address}:32400/:/progress?key={id}&identifier=com.plexapp.plugins.library&time={time}&state={state}&X-Plex-Token={plex_token}' -Method 'PUT' Write-Output $response