Lyrenhex/Ubipy-Music-Player

For files lacking metadata, use directory tree

Closed this issue · 1 comments

The recommended Ubipy directory tree, which splits songs into their albums and artists, provides most, if not all, of the required metadata information within the file path. The full file path is indexed at the start of the program. It would probably be a good idea to, if the metadata cannot be found, substitute it for the file path data.

General concept:

try:
    song = metadata['TIT2']
    album = metadata['TALB']
    artist = metadata['TPE1']
except:
    data = filepath.split("/")
    song = data[3].split(".")[0]
    album = data[2]
    artist = data[1]

Closing, because this should now be fixed in commit 5033718.