Update kill_plex_stream.py

This commit is contained in:
blacktwin 2017-07-14 08:40:48 -04:00 committed by GitHub
parent c98b74c027
commit ec13d14292

View File

@ -1,6 +1,7 @@
import requests
import platform
from uuid import getnode
import unicodedata
## EDIT THESE SETTINGS ##
PLEX_HOST = ''
@ -56,6 +57,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')
sessions.append((id, user, title))
for session in sessions: