Update kill_session_bitrate.py

This commit is contained in:
blacktwin 2017-07-14 08:41:19 -04:00 committed by GitHub
parent ec13d14292
commit e4a8321e86

View File

@ -5,6 +5,7 @@ PlexPy Playback Start
import requests
import platform
from uuid import getnode
import unicodedata
## EDIT THESE SETTINGS ##
PLEX_HOST = ''
@ -60,6 +61,7 @@ for s in response['MediaContainer']['Video']:
id = s['Session']['id']
user = s['User']['title']
title = (s['grandparentTitle'] + ' - ' if s['type'] == 'episode' else '') + s['title']
title = unicodedata.normalize('NFKD', title).encode('ascii','ignore')
bitrate = s['Media']['bitrate']
sessions.append((id, user, title, bitrate))