Taiko2k / Tauon

The music player of today! :city_sunrise:
https://tauonmusicbox.rocks
GNU General Public License v3.0
1.77k stars 67 forks source link

Choose playlist export location + path type #653

Closed nicolnt closed 2 years ago

nicolnt commented 2 years ago

At the moment when I export a playlist as XSPF (or the recently added M3U) it goes in this directory /home/nicolas/.var/app/com.github.taiko2k.tauonmb/data/TauonMusicBox/playlists/

However this makes sharing a playlist or moving the music folder to some other location not so easy.

I am suggesting a setting to be able to export them into a custom directory and also being able to specify how they point to each track, on choice:

For instance with the second option I could export the playlist file in a "Playlist" folder into my music file library (e.g. /media/nicolas/Musics/Playlists) and it would refer to the different tracks in the form of ../artist - music.mp3 instead of /media/nicolas/Musics/artist - music.mp3. This way I could use the same playlist file on both my phone and laptop, because it would be a relative path!

Let me know if I need to clarify :wink:

Taiko2k commented 2 years ago

Yeah, I think that makes sense and would be a useful feature. Ill add it to my todo list.

nicolnt commented 2 years ago

Awesome! It could be a new setting into "Settings" like "Playlists". Maybe an auto-save playlist file feature would be a nice to have too.

Taiko2k commented 2 years ago

Do you think it's the case that changing the single default export directory is sufficient, or should each playlist remember it's own export location? Do you keep all your playlists in one folder for example?

nicolnt commented 2 years ago

Good point! In my case I use Tauon only for music and I have only one library on each of my devices, things may be different for someone else having multiple sources. It sounds like it's better to be able to dissociate the export settings. Here's an example illustrating a situation where having a single export folder for multiple sources fails:

I have a directory for my music /media/nicolas/Music/ and one for podcasts that could be elsewhere on my computer, e.g. /home/nicolas/Downloads/Podcasts. In Tauon I have some playlists for my music and some for the podcasts. If there was a single export location, say /media/nicolas/Music/Playlist, it would be fine for the music, however paths pointing to the podcast audio files would look like this ../../../../home/nicolas/Downloads/Podcasts/podcast file.mp3 which can't really be shared across device. Playlist files should be as close as possible to the audio files to be location independent.

Moreover I discovered that on Android VLC can read a playlist file and all the other players I tried couldn't, Android stores playlists in a database. So this feature would only be relevant for computer to computer sharing I guess.

Taiko2k commented 2 years ago

Okay I've come up with something. Might not be convenient for all use cases, but at least its simple, which might be better.

Screenshot from 2022-01-16 18-00-50

This box now shows on right click playlist tab > "Export...".

Settings are remembered for each playlist. Each playlist defaults to ~/Music as the export location.

nicolnt commented 2 years ago

Wow that's just awesome! Everything is here, you did a really good job

Jan 16, 2022 06:03:50 Taiko2k @.***>:

Okay I've come up with something. Might not be convenient for all use cases, but at least its simple, which might be better.

[https://user-images.githubusercontent.com/17271572/149647947-b811276e-86d3-4739-b4cf-17b61dd3aee4.png][Screenshot from 2022-01-16 18-00-50][https://user-images.githubusercontent.com/17271572/149647947-b811276e-86d3-4739-b4cf-17b61dd3aee4.png]

This box now shows on /right click playlist tab/ > "Export...".

Settings are remembered for each playlist. Each playlist defaults to ~/Music as the export location.

— Reply to this email directly, view it on GitHub[https://github.com/Taiko2k/TauonMusicBox/issues/653#issuecomment-1013811849], or unsubscribe[https://github.com/notifications/unsubscribe-auth/AC6N35HQXY2JXEQAYUIKFN3UWJGTLANCNFSM5LV7UWSQ]. Triage notifications on the go with GitHub Mobile for iOS[https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675] or Android[https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub]. You are receiving this because you authored the thread. [data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFQAAABUCAYAAAAcaxDBAAAABHNCSVQICAgIfAhkiAAAADJJREFUeJztwQENAAAAwqD3T20ON6AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAB4NW6UAAFvMNJxAAAAAElFTkSuQmCC###24x24:true###][Tracking image][https://github.com/notifications/beacon/AC6N35BINGLIC66SY4SWMO3UWJGTLA5CNFSM5LV7UWS2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOHRWYVCI.gif]

nicolnt commented 2 years ago

Well done, I really enjoy this new feature!

nicolnt commented 2 years ago

Tauon crashes when exporting empty playlist. It may not make sense to export an empty playlist, however I did that to prepare the auto-export system and would have started adding tracks on the go.

Taiko2k commented 2 years ago

Tauon crashes when exporting empty playlist.

Okay, I've now committed a fix for this