ziqiangao commited on
Commit
13ad538
·
1 Parent(s): e58a7cc

fix external info on mp3s with no ID3

Browse files
Files changed (1) hide show
  1. app.py +5 -2
app.py CHANGED
@@ -220,8 +220,11 @@ def main(file, name, fps=30, res: tuple=(1280,720), oscres=512, sr=11025, lyrics
220
  cover_img = cover_file
221
  else:
222
  raise gr.Error("Mp3 must have a cover image, upload the image under the 'Metadata' section", duration=None)
223
- elif cover_img == -1 and not (tit or ast):
224
- raise gr.Error("Mp3 is missing tags, add the info under the 'Metadata' section", duration=None)
 
 
 
225
 
226
  title, artist = getTitleAndArtist(audio_path)
227
  if title == '' or artist == '':
 
220
  cover_img = cover_file
221
  else:
222
  raise gr.Error("Mp3 must have a cover image, upload the image under the 'Metadata' section", duration=None)
223
+ elif cover_img == -1 and not (tit or ast or img):
224
+ if img:
225
+ cover_img = cover_file
226
+ else:
227
+ raise gr.Error("Mp3 is missing tags, add the info under the 'Metadata' section", duration=None)
228
 
229
  title, artist = getTitleAndArtist(audio_path)
230
  if title == '' or artist == '':