I was thinking a bit on the best way to export a Playlist or similar as a m3u(8)-file.
Since as far as I know this only needs the file-path to the media-files and that path could be relative, this should be easy to achieve in a portable manner.
Now I had two ideas for this:
- Add this as a feature for
funkwhale download. This would generate a m3u8-file in the root directory the music is being downloaded to, with the relative path to all files which have been downloaded. I think providing a file-name to the m3u8-file should be an option.
This should be easiest to implement, since it only entails one or two additional flags to the
download-feature and it would also be the easiest way to get a playlist when downloading tracks (it could be a playlist with any tracks and wouldn't be bound to the playlists in funkwhale).
- Add a new base-command for example
funkwhale export-playlist. This could take a playlist id, a naming-scheme (like with the download), the file-path for the m3u8 and optionally a file-extension. From them it would generate a m3u8, with the path from the naming-scheme + extension.
This would be similar in many ways to
funkwhale download - at least from the used parameters. It would allow to also generate a playlist, when you don't want to download the tracks (for example cause you already have them). Also we could provide a number of track-ids to have the flexibility of the download.
Just to quickly explain my use-cases:
Since the dsub-plugin for kodi doesn't really work for me and the integration isn't that great anyways, it would be really nice to somehow have access to my funkwhale playlists there. I could imagine exporting them with a cron-job or similar, to keep them up-to-date.
Also I'm getting a digital-audio-player which doesn't have any internet access. So there I'd want access to my funkwhale playlists too. (In general also having certain radios on there would be nice, so the mentioned flexibility would still be nice).
I also can imagine implementing this issue myself.