update readme and fix id3 tag editing

This commit is contained in:
billypom on debian 2024-07-27 19:37:53 -04:00
parent aa7c749d84
commit 268c6a9289
2 changed files with 3 additions and 1 deletions

View File

@ -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?

View File

@ -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