mirror of
https://git.lecygnenoir.info/LecygneNoir/prismedia.git
synced 2025-10-03 09:29:16 +02:00
Merge branch 'hotfix/issue19'
This commit is contained in:
commit
097ff965bb
2 changed files with 4 additions and 1 deletions
|
@ -57,7 +57,7 @@ def get_default_playlist(user_info):
|
||||||
|
|
||||||
def get_playlist_by_name(user_info, options):
|
def get_playlist_by_name(user_info, options):
|
||||||
for playlist in user_info["videoChannels"]:
|
for playlist in user_info["videoChannels"]:
|
||||||
if playlist['displayName'] == options.get('--playlist'):
|
if playlist['displayName'].encode('utf8') == str(options.get('--playlist')):
|
||||||
return playlist['id']
|
return playlist['id']
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -193,6 +193,7 @@ def parseNFO(options):
|
||||||
def upcaseFirstLetter(s):
|
def upcaseFirstLetter(s):
|
||||||
return s[0].upper() + s[1:]
|
return s[0].upper() + s[1:]
|
||||||
|
|
||||||
|
|
||||||
def cleanString(toclean):
|
def cleanString(toclean):
|
||||||
toclean = toclean.split(' ')
|
toclean = toclean.split(' ')
|
||||||
cleaned = ''
|
cleaned = ''
|
||||||
|
@ -201,6 +202,8 @@ def cleanString(toclean):
|
||||||
continue
|
continue
|
||||||
strtoclean = unicodedata.normalize('NFKD', unicode (s, 'utf-8')).encode('ASCII', 'ignore')
|
strtoclean = unicodedata.normalize('NFKD', unicode (s, 'utf-8')).encode('ASCII', 'ignore')
|
||||||
strtoclean = ''.join(e for e in strtoclean if e.isalnum())
|
strtoclean = ''.join(e for e in strtoclean if e.isalnum())
|
||||||
|
if strtoclean == '':
|
||||||
|
continue
|
||||||
strtoclean = upcaseFirstLetter(strtoclean)
|
strtoclean = upcaseFirstLetter(strtoclean)
|
||||||
cleaned = cleaned + strtoclean
|
cleaned = cleaned + strtoclean
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue