mirror of
https://github.com/cooperhammond/irs.git
synced 2025-01-02 19:15:26 +00:00
Fixed Issue #16
This commit is contained in:
parent
7cf80b548f
commit
46ff493d11
|
@ -42,7 +42,7 @@ class Metadata:
|
|||
def read_tag(self, tag):
|
||||
try:
|
||||
return self.mp3[tag]
|
||||
except EasyID3KeyError:
|
||||
except Exception:
|
||||
return []
|
||||
|
||||
def add_album_art(self, image_url):
|
||||
|
|
|
@ -332,16 +332,20 @@ class Ripper:
|
|||
|
||||
m = Metadata(file_name)
|
||||
|
||||
m.add_tag( "title", data["name"])
|
||||
m.add_tag( "artist", data["artist"])
|
||||
m.add_tag( "comment", 'URL: "%s"\nVideo Title: "%s"' % (video_url, video_title))
|
||||
if data != {}:
|
||||
m.add_tag("comment", 'URL: "%s"\nVideo Title: "%s"' % (video_url, video_title))
|
||||
if len(data.keys()) > 1:
|
||||
m.add_tag("title", data["name"])
|
||||
m.add_tag("artist", data["artist"])
|
||||
m.add_tag("album", data["album"])
|
||||
m.add_tag("genre", data["genre"])
|
||||
m.add_tag("tracknumber", str(data["track_number"]))
|
||||
m.add_tag("discnumber", str(data["disc_number"]))
|
||||
m.add_tag("compilation", data["compilation"])
|
||||
m.add_album_art( str(data["album_art"]))
|
||||
else:
|
||||
print ("Could not find metadata.")
|
||||
m.add_tag("title", song)
|
||||
m.add_tag("artist", artist)
|
||||
|
||||
if self.type == "song":
|
||||
return self.post_processing([file_name])
|
||||
|
|
Loading…
Reference in a new issue