Fix id3pp: try..catch for lyrics, file.save()
This commit is contained in:
parent
3a25d86b4f
commit
7669127826
1 changed files with 7 additions and 2 deletions
|
@ -58,7 +58,12 @@ class ID3TagsPP(PostProcessor):
|
|||
if 'track_number' in information:
|
||||
file['TRCK'] = id3.TRCK(encoding=ENC_UTF8, text=str(information['track_number']))
|
||||
|
||||
lyr_url = genius.search(title, artist)
|
||||
file['USLT'] = id3.USLT(encoding=ENC_UTF8, text=genius.parse(lyr_url))
|
||||
try:
|
||||
lyr_url = genius.search(title, artist)
|
||||
file['USLT'] = id3.USLT(encoding=ENC_UTF8, text=genius.parse(lyr_url))
|
||||
except:
|
||||
pass
|
||||
|
||||
file.save()
|
||||
|
||||
return [], information
|
||||
|
|
Loading…
Reference in a new issue