mirror of
https://github.com/blacktwin/JBOPS.git
synced 2025-12-16 21:15:37 +00:00
Update kill_plex_stream.py
This commit is contained in:
parent
c98b74c027
commit
ec13d14292
@ -1,6 +1,7 @@
|
|||||||
import requests
|
import requests
|
||||||
import platform
|
import platform
|
||||||
from uuid import getnode
|
from uuid import getnode
|
||||||
|
import unicodedata
|
||||||
|
|
||||||
## EDIT THESE SETTINGS ##
|
## EDIT THESE SETTINGS ##
|
||||||
PLEX_HOST = ''
|
PLEX_HOST = ''
|
||||||
@ -56,6 +57,7 @@ for s in response['MediaContainer']['Video']:
|
|||||||
id = s['Session']['id']
|
id = s['Session']['id']
|
||||||
user = s['User']['title']
|
user = s['User']['title']
|
||||||
title = (s['grandparentTitle'] + ' - ' if s['type'] == 'episode' else '') + s['title']
|
title = (s['grandparentTitle'] + ' - ' if s['type'] == 'episode' else '') + s['title']
|
||||||
|
title = unicodedata.normalize('NFKD', title).encode('ascii','ignore')
|
||||||
sessions.append((id, user, title))
|
sessions.append((id, user, title))
|
||||||
|
|
||||||
for session in sessions:
|
for session in sessions:
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user