mirror of
https://github.com/cooperhammond/irs.git
synced 2024-12-22 17:35:28 +00:00
Fulfilled #12 feature request
This commit is contained in:
parent
e4d97753b3
commit
54e23c4f35
|
@ -2,7 +2,7 @@
|
|||
from mutagen.mp3 import MP3, EasyMP3
|
||||
from mutagen.easyid3 import EasyID3, EasyID3KeyError
|
||||
from mutagen.id3 import * # There's A LOT of stuff to import, forgive me.
|
||||
from mutagen.id3 import APIC
|
||||
from mutagen.id3 import APIC, ID3, COMM
|
||||
|
||||
# System
|
||||
import sys
|
||||
|
@ -31,8 +31,8 @@ class Metadata:
|
|||
def __init__(self, location):
|
||||
self.spotify = spotipy.Spotify()
|
||||
self.location = location
|
||||
#self.mp3 = MP3(self.location, ID3=EasyID3)
|
||||
self.mp3 = EasyID3(self.location)
|
||||
EasyID3.RegisterTextKey("comment", "COMM")
|
||||
|
||||
def add_tag(self, tag, data):
|
||||
# For valid tags: `EasyID3.valid_keys.keys()`
|
||||
|
|
|
@ -334,6 +334,7 @@ class Ripper:
|
|||
|
||||
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("album", data["album"])
|
||||
m.add_tag("genre", data["genre"])
|
||||
|
|
Loading…
Reference in a new issue