polaris icon indicating copy to clipboard operation
polaris copied to clipboard

Downloading Playlists

Open DevilsDesigns opened this issue 3 years ago • 8 comments

Is there currently a way to download playlists created?

DevilsDesigns avatar Nov 13 '22 03:11 DevilsDesigns

Sorry, this is not currently supported.

agersant avatar Nov 13 '22 03:11 agersant

can this be added as an enhancement in the future? I couldnt find the enhancement tag

DevilsDesigns avatar Nov 13 '22 06:11 DevilsDesigns

I just added the tag. Do you mean downloading the playlist metadata (eg. an m3u file) or an archive containing the audio files?

agersant avatar Nov 13 '22 07:11 agersant

I mean downloading an m3u with all data from the playlist so if need be we can move them around to different pcs or apps. Is that possible?

DevilsDesigns avatar Nov 13 '22 15:11 DevilsDesigns

Note that Polaris playlists are saved on the server so you shouldn't have to move them between different PC, as long as you are connecting to the same Polaris server.

Exporting playlist m3u files would be possible, but technical limitations make it not very useful. For each song the playlist, the m3u file must store a path or URL where the song can be accessed. In the context of polaris, the options are:

  • URL pointing directly to the audio file (eg. http://mypolarisserver.com/audio/my_music/classical/cool-song.mp3). This is fairly useless as accessing these URL requires authentication headers which media players can't provide. This means trying to open one of these m3u files in foobar / VLC / Rythmbox would not work.
  • Absolute file paths on the server (eg. /home/devilsdesigns/desktop/music/classsical/cool-song.mp3). There is no authentication problem with this solution but the playlist would only work when played on the server itself, or another computer where the paths happen to also be valid. I also don't love that this leaks the folder structure from the server.
  • Relative file paths. This makes the most sense, paths would be similar to the ones seen in the Polaris UI (eg. /my_music/classical/cool-song.mp3 ), but a playlist file like this could not be played anywhere.

Would any of these make sense for your use case?

agersant avatar Nov 13 '22 19:11 agersant

The second option would be highly desirable for my use case

Typhonragewind avatar May 05 '23 20:05 Typhonragewind

I am toying with the idea of exporting a playlist for some time now. Here is my use case and a solution that I have come up with.

Use case

  • I use docker
  • I have two mount points
    • /path1/english mounts in /music/english
    • /path2/hindi mounts in /music/hindi
  • Some playlists contain songs from both mount points
  • Some playlists are large
  • I want both import and export feature

Solution

  • Use relative path.
    • This keeps the exported m3u file small and still allows to be usable without any editing when there is single mount point.
    • This works on docker as well as non-docker instances.
  • Use m3u custom m3u header to give hint about absolute path
    • This helps use the m3u file with quick edit by manually editing (find and replace)

A little more details here - https://github.com/pmphfm/polaris/blob/master/docs/user-guide-src/src/playlists.md#export

pmphfm avatar May 06 '23 07:05 pmphfm