# (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program. If not, see <http://www.gnu.org/licenses/> ################################################################################ from eyed3.id3 import Tag from eyed3.id3 import ID3_V1_0, ID3_V1_1, ID3_V2_3, ID3_V2_4 import logging from eyed3 import log log.setLevel(logging.DEBUG) t = Tag() t.artist = u"M.O.P." t.title = u"How About Some Hardcore" t.album = u"To The Death" t.genre = u"Hip-Hop" t.track_num = (3, 5) t.disc_num = (1, 1) t.original_release_date = "1994-04-07" t.release_date = "1994-04-07" t.encoding_date = "2002-03" t.recording_date = 1996 t.tagging_date = "2012-2-5"
# (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program. If not, see <http://www.gnu.org/licenses/> ################################################################################ from eyed3.id3 import Tag from eyed3.id3 import ID3_V1_0, ID3_V1_1, ID3_V2_3, ID3_V2_4 import logging from eyed3 import log log.setLevel(logging.DEBUG) t = Tag() t.artist = u"M.O.P." t.title = u"How About Some Hardcore" t.album = u"To The Death" t.genre = u"Hip-Hop" t.track_num = (3,5) t.disc_num = (1,1) t.original_release_date = "1994-04-07" t.release_date = "1994-04-07" t.encoding_date = "2002-03" t.recording_date = 1996 t.tagging_date = "2012-2-5"
# main GUI imports bases. from .utilities import MUSICPATH, COVERSPATH, replchars, rmbytes, EXPATH from tkinter.messagebox import showinfo, showerror from tkinter import PhotoImage from os import listdir, remove from os.path import splitext from eyed3 import load, log # main GUI code bases. # eyed3 just log the errors. log.setLevel('ERROR') # it contains all the .mp3s from the path given by the user. songs = (song for song in listdir(MUSICPATH)) # this function shows the next mp3. def nextsong(varsdict, imgbtn, default_album): try: global tags, song, album, def_album song = MUSICPATH + next(songs) MP3 = load(song) tags = MP3.tag album = tags.album def_album = default_album def_album.set(album) artist = tags.artist varsdict['Título'].set(rmbytes(tags.title)) varsdict['Artista'].set(rmbytes(artist)) varsdict['Género'].set(rmbytes(str(tags.genre)))
from os import path from os import walk from time import strftime import biplist from eyed3 import id3 from eyed3 import log import xattr # Helpful if you want to ignore errors. # https://stackoverflow.com/a/25614061/1896134 # https://stackoverflow.com/a/39316798/1896134 # log.setLevel("ERROR") log.setLevel("INFO") # from tinytag import TinyTag # from tinytag import TinyTagException def _now(): """The Module Returns "Current Time" As A Formatted String.""" ymd = str(strftime('%Y%m%d_%H%M%S')) return ymd current_home = path.expanduser('~') new_file = (current_home + '/Desktop/testin_' + _now() + '.csv') includes_file_extensn = (".mp3", ".m4a", ".flac", ".alac", ".aif", ".aiff") search_dir = path.join(current_home, 'Music')