|
@@ -1,9 +1,10 @@
|
|
|
-from helper import console
|
|
|
|
|
from mutagen.id3 import ID3NoHeaderError
|
|
from mutagen.id3 import ID3NoHeaderError
|
|
|
from mutagen.id3 import ID3, TIT2, TALB, TPE1, COMM, TCON, APIC
|
|
from mutagen.id3 import ID3, TIT2, TALB, TPE1, COMM, TCON, APIC
|
|
|
|
|
|
|
|
|
|
+from helper import console
|
|
|
from helper.sites.request import RawRequest
|
|
from helper.sites.request import RawRequest
|
|
|
from tags import available
|
|
from tags import available
|
|
|
|
|
+from helper.settings import Settings
|
|
|
|
|
|
|
|
|
|
|
|
|
def search_tags(item):
|
|
def search_tags(item):
|
|
@@ -57,15 +58,14 @@ def write_tags_to_file(file, item):
|
|
|
mp3['TIT2'] = TIT2(encoding=3, text=tagitem.title)
|
|
mp3['TIT2'] = TIT2(encoding=3, text=tagitem.title)
|
|
|
mp3['TALB'] = TALB(encoding=3, text=tagitem.album)
|
|
mp3['TALB'] = TALB(encoding=3, text=tagitem.album)
|
|
|
mp3['TPE1'] = TPE1(encoding=3, text=tagitem.artist)
|
|
mp3['TPE1'] = TPE1(encoding=3, text=tagitem.artist)
|
|
|
- mp3['COMM'] = COMM(encoding=3, text='LABEL:{0};'.format(tagitem.label))
|
|
|
|
|
mp3['TCON'] = TCON(encoding=3, text=tagitem.genre)
|
|
mp3['TCON'] = TCON(encoding=3, text=tagitem.genre)
|
|
|
-
|
|
|
|
|
mp3['APIC'] = APIC(encoding=3,
|
|
mp3['APIC'] = APIC(encoding=3,
|
|
|
mime='image/jpeg',
|
|
mime='image/jpeg',
|
|
|
type=3,
|
|
type=3,
|
|
|
desc='Cover',
|
|
desc='Cover',
|
|
|
data=tagitem.cover_image)
|
|
data=tagitem.cover_image)
|
|
|
|
|
|
|
|
|
|
+ mp3.add(COMM(encoding=3, lang=u'eng', text=Settings.CommentFormat.get().format(**tagitem.__dict__)))
|
|
|
mp3.save(file)
|
|
mp3.save(file)
|
|
|
|
|
|
|
|
|
|
|