teticio / Deej-AI

Create automatic playlists by using Deep Learning to *listen* to the music.
GNU General Public License v3.0
334 stars 52 forks source link

Fix m3u playlist header and output to relative paths #103

Closed AlfredJKwack closed 3 months ago

AlfredJKwack commented 3 months ago

Improve playlist portability by changing the output of the --playlist option so that track paths are relative to the m3u file's location instead of absolute. While we're at it fix the header of the file so that it starts with #EXTM3U as per the spec.

An example: If you specifiy --playlist as /home/user/playlists/playlist_outfile.m3u and one of the selected tracks is located at home/user/music/some_awesome_music.mp3 the resulting playlist will write that track's location out as ../music/some_awesome_music.mp3.

teticio commented 3 months ago

Thanks for contributing!

AlfredJKwack commented 3 months ago

Oh wow. Thanks for the merge @teticio. That was kind of you. Glad I could contribute.