mirror of
https://github.com/cooperhammond/irs.git
synced 2025-04-17 14:01:39 +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.mp3 import MP3, EasyMP3
|
||||||
from mutagen.easyid3 import EasyID3, EasyID3KeyError
|
from mutagen.easyid3 import EasyID3, EasyID3KeyError
|
||||||
from mutagen.id3 import * # There's A LOT of stuff to import, forgive me.
|
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
|
# System
|
||||||
import sys
|
import sys
|
||||||
|
@ -31,8 +31,8 @@ class Metadata:
|
||||||
def __init__(self, location):
|
def __init__(self, location):
|
||||||
self.spotify = spotipy.Spotify()
|
self.spotify = spotipy.Spotify()
|
||||||
self.location = location
|
self.location = location
|
||||||
#self.mp3 = MP3(self.location, ID3=EasyID3)
|
|
||||||
self.mp3 = EasyID3(self.location)
|
self.mp3 = EasyID3(self.location)
|
||||||
|
EasyID3.RegisterTextKey("comment", "COMM")
|
||||||
|
|
||||||
def add_tag(self, tag, data):
|
def add_tag(self, tag, data):
|
||||||
# For valid tags: `EasyID3.valid_keys.keys()`
|
# For valid tags: `EasyID3.valid_keys.keys()`
|
||||||
|
|
|
@ -334,6 +334,7 @@ class Ripper:
|
||||||
|
|
||||||
m.add_tag( "title", data["name"])
|
m.add_tag( "title", data["name"])
|
||||||
m.add_tag( "artist", data["artist"])
|
m.add_tag( "artist", data["artist"])
|
||||||
|
m.add_tag( "comment", 'URL: "%s"\nVideo Title: "%s"' % (video_url, video_title))
|
||||||
if data != {}:
|
if data != {}:
|
||||||
m.add_tag("album", data["album"])
|
m.add_tag("album", data["album"])
|
||||||
m.add_tag("genre", data["genre"])
|
m.add_tag("genre", data["genre"])
|
||||||
|
|
Loading…
Reference in a new issue