Update kill_more_than.py
This commit is contained in:
parent
eb579adda9
commit
c98b74c027
@ -21,6 +21,7 @@ import requests
|
|||||||
import platform
|
import platform
|
||||||
from uuid import getnode
|
from uuid import getnode
|
||||||
import sys
|
import sys
|
||||||
|
import unicodedata
|
||||||
|
|
||||||
## EDIT THESE SETTINGS ##
|
## EDIT THESE SETTINGS ##
|
||||||
PLEX_HOST = ''
|
PLEX_HOST = ''
|
||||||
@ -87,6 +88,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))
|
||||||
|
|
||||||
if len(sessions) == 1:
|
if len(sessions) == 1:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user