From 268c6a928945fe3488c0813bafd731a6d73b0918 Mon Sep 17 00:00:00 2001 From: billypom on debian Date: Sat, 27 Jul 2024 19:37:53 -0400 Subject: [PATCH] update readme and fix id3 tag editing --- README.md | 1 + components/MusicTable.py | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 65fe049..57541f5 100644 --- a/README.md +++ b/README.md @@ -31,4 +31,5 @@ python3 main.py - [x] Editable lyrics textbox - [ ] Delete songs from library (del key || right-click delete) - [ ] .wav, .ogg, .flac convertor +- [ ] batch metadata changer (red text on fields that have differing info) - [ ] Alternatives to Gstreamer? diff --git a/components/MusicTable.py b/components/MusicTable.py index 0b27701..e17b772 100644 --- a/components/MusicTable.py +++ b/components/MusicTable.py @@ -266,13 +266,14 @@ class MusicTable(QTableView): # Read file metadata audio = ID3(filepath) artist = ( - audio["TIT2"].text[0] if not "" or None else "Unknown Artist" + audio["TPE1"].text[0] if not "" or None else "Unknown Artist" ) album = audio["TALB"].text[0] if not "" or None else "Unknown Album" # Determine the new path that needs to be made new_path = os.path.join( target_dir, artist, album, os.path.basename(filepath) ) + print(new_path) # Create the directories if they dont exist os.makedirs(os.path.dirname(new_path), exist_ok=True) # Move the file to the new directory