mirror of
https://github.com/Tautulli/Tautulli.git
synced 2025-07-11 07:46:07 -07:00
Fix rating_key on sync table
This commit is contained in:
parent
651b57a93f
commit
01791eac52
1 changed files with 4 additions and 5 deletions
|
@ -341,12 +341,11 @@ class PlexTV(object):
|
|||
settings_video_quality = helpers.get_xml_attr(settings, 'videoQuality')
|
||||
settings_video_resolution = helpers.get_xml_attr(settings, 'videoResolution')
|
||||
|
||||
if helpers.get_xml_attr(item.getElementsByTagName('Location')[0], 'uri').endswith('%2Fchildren'):
|
||||
clean_uri = helpers.get_xml_attr(item.getElementsByTagName('Location')[0], 'uri')[:-11]
|
||||
else:
|
||||
clean_uri = helpers.get_xml_attr(item.getElementsByTagName('Location')[0], 'uri')
|
||||
for location in item.getElementsByTagName('Location'):
|
||||
clean_uri = helpers.get_xml_attr(location, 'uri').split('%2F')
|
||||
|
||||
rating_key = clean_uri.rpartition('%2F')[-1]
|
||||
rating_key = next((clean_uri[(idx + 1) % len(clean_uri)]
|
||||
for idx, item in enumerate(clean_uri) if item == 'metadata'), None)
|
||||
|
||||
sync_details = {"device_name": helpers.sanitize(device_name),
|
||||
"platform": helpers.sanitize(device_platform),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue