update readme and fix id3 tag editing
This commit is contained in:
parent
aa7c749d84
commit
268c6a9289
@ -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?
|
||||
|
||||
@ -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
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user