mirror of
https://github.com/Tautulli/Tautulli.git
synced 2025-07-14 01:02:59 -07:00
Add delete_synced_item to the API
This commit is contained in:
parent
1a96da04a1
commit
393b395df0
1 changed files with 18 additions and 3 deletions
|
@ -2649,13 +2649,28 @@ class WebInterface(object):
|
|||
@cherrypy.expose
|
||||
@cherrypy.tools.json_out()
|
||||
@requireAuth(member_of("admin"))
|
||||
def delete_sync_rows(self, client_id, sync_id, **kwargs):
|
||||
@addtoapi("delete_synced_item")
|
||||
def delete_sync_rows(self, client_id=None, sync_id=None, **kwargs):
|
||||
""" Delete a synced item from a device.
|
||||
|
||||
```
|
||||
Required parameters:
|
||||
client_id (str): The client ID of the device to delete from
|
||||
sync_id (str): The sync ID of the synced item
|
||||
|
||||
Optional parameters:
|
||||
None
|
||||
|
||||
Returns:
|
||||
None
|
||||
```
|
||||
"""
|
||||
if client_id and sync_id:
|
||||
plex_tv = plextv.PlexTV()
|
||||
delete_row = plex_tv.delete_sync(client_id=client_id, sync_id=sync_id)
|
||||
return {'message': 'Sync deleted'}
|
||||
return {'result': 'success', 'message': 'Synced item deleted successfully.'}
|
||||
else:
|
||||
return {'message': 'no data received'}
|
||||
return {'result': 'error', 'message': 'Missing client ID and sync ID.'}
|
||||
|
||||
|
||||
##### Logs #####
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue