From 06fa1d076e879aeceabc76fc477425ad40dd26d8 Mon Sep 17 00:00:00 2001 From: Alex Date: Thu, 25 May 2023 18:52:36 +0200 Subject: [PATCH] =?UTF-8?q?Initial=20Commit=20f=C3=BCr=20ID3=20Tags=20Edit?= =?UTF-8?q?or?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ID3_TagEditor.py | 53 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 53 insertions(+) create mode 100644 ID3_TagEditor.py diff --git a/ID3_TagEditor.py b/ID3_TagEditor.py new file mode 100644 index 0000000..a63bb36 --- /dev/null +++ b/ID3_TagEditor.py @@ -0,0 +1,53 @@ +#Note: In DXM Bragi einbauen! +import taglib +import glob + +# FF 1 -> done +# FF 2 -> done +# FF 3 -> done +# FF 4 -> done +# FF 5 -> done +# FF 6 -> done +# FF 7 -> done +# FF 7R-> done +# FF 8 -> done +# FF 9 -> done +# FF 10-> +# +for py in glob.glob("./Final Fantasy Mystic Quest OST (SNES_SFC)/*.mp3"): + #print(py) + song = taglib.File(py) + #print(song.tags) + + #print('Optimized:') + title_splits = py.split("-",3) + #print(title_splits) + + trackNr = title_splits[1].strip() + + #print(trackNr) + + #title = title_splits[1].split(".")[0].strip() + title = title_splits[2].split(".")[0].strip() + #print(title) + + composer = ['Ryuji Sasai','Yasuhiro Kawakami'] + album = 'Final Fantasy Mystic Quest OST' + year = '1992' + description = '(SNES)' + genres = ['VGM','RPG'] + + song.tags['TITLE'] = [title] + song.tags['ARTIST'] = composer + song.tags['ALBUM'] = [album] + song.tags['TRACKNUMBER'] = [trackNr] + song.tags['DATE'] = [year] + song.tags['DESCRIPTION'] = [description] + song.tags["GENRE"] = genres + del song.tags['COMMENT'] + del song.tags['PURL'] + print(song.tags) + + song.save() + print("{} -> done".format(py) ) + #break