2024-10-19, 12:45 PM
(This post was last modified: 2024-10-19, 12:46 PM by itai shufman. Edited 1 time in total.)
i seem to have the same problem and getting the item first isnt solving it.
import requests
auth = 'MediaBrowser Token="my_api_token"'
server = 'http://127.0.0.1:8096'
uri = f"/Items?parentId=some_playlist_id&fields=Path"
videos = requests.get(f'{server}{uri}',headers={'Authorization': auth}).json()
for vid in videos['Items']:
vid['Name'] = custom_parsing_function(vid['Path'])
update_uri = f"/Items/{vid['Id']}"
resp = requests.post(f'{server}{update_uri}',headers={'Authorization': auth}, json=vid)
i get status code 400 back.
is this because i include the "path" in thhe GET command?
import requests
auth = 'MediaBrowser Token="my_api_token"'
server = 'http://127.0.0.1:8096'
uri = f"/Items?parentId=some_playlist_id&fields=Path"
videos = requests.get(f'{server}{uri}',headers={'Authorization': auth}).json()
for vid in videos['Items']:
vid['Name'] = custom_parsing_function(vid['Path'])
update_uri = f"/Items/{vid['Id']}"
resp = requests.post(f'{server}{update_uri}',headers={'Authorization': auth}, json=vid)
i get status code 400 back.
is this because i include the "path" in thhe GET command?