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:
|
if 'track_number' in information:
|
||||||
file['TRCK'] = id3.TRCK(encoding=ENC_UTF8, text=str(information['track_number']))
|
file['TRCK'] = id3.TRCK(encoding=ENC_UTF8, text=str(information['track_number']))
|
||||||
|
|
||||||
|
try:
|
||||||
lyr_url = genius.search(title, artist)
|
lyr_url = genius.search(title, artist)
|
||||||
file['USLT'] = id3.USLT(encoding=ENC_UTF8, text=genius.parse(lyr_url))
|
file['USLT'] = id3.USLT(encoding=ENC_UTF8, text=genius.parse(lyr_url))
|
||||||
|
except:
|
||||||
|
pass
|
||||||
|
|
||||||
|
file.save()
|
||||||
|
|
||||||
return [], information
|
return [], information
|
||||||
|
|
Loading…
Add table
Reference in a new issue