SubsonicTools: Export all playlists from Subsonic Music Streamer to .m3u playlist files


Starting with version 4.7 (changelog), the Subsonic Music Streamer no longer saves playlists as .m3u files but stores the playlist information in its internal database to offer a more sophisticated playlist management (like shared and private playlists).

Before version 4.7 it was very easy to share the Subsonic playlists with other media servers that also use a directory containing .m3u files as data source (like the Logitech Media Server): Sharing a folder containing the .m3u files automatically synchronizes the playlists between the media servers.

Fortunately, the Subsonic media server offers a very well documented REST API that can be used to export playlist information amongst a lot of other functionalities.

To easily export all playlists from the Subsonic media server and save them as .m3u files in a specific destination directory I’ve written the SubsonicTools project which is available here (GitHub).

To export all playlist with SubsonicTools use the following command:

python SubsonicTools.py ExportPlaylists --url=[SUBSONIC-URL] --user=[YOUR-SUBSONIC-USER] --password=[YOUR-SUBSONIC-PASSWORD] --out=[PATH-TO-DESTINATION-DIRECTORY] --prefix=[FILE-PREFIX]

To run SubsonicTools 0.1 you need to install the Python library Requests >= 0.8.8 (follow the install instructions here).

Please note: The SubsonicTools project is in a prototype state; it was only tested with Python 2.7 and a Subsonic media server 4.7. If you find any errors, miss a feature or have any suggestions please don’t hesitate to leave a comment or to send me a private message.


3 responses to “SubsonicTools: Export all playlists from Subsonic Music Streamer to .m3u playlist files”

  1. Hey there! First of all thanks a lot for your script, very helpful!

    However it did not work on my machine because of non-ASCII characters in some of my files. After doing a little bit of research I foudn a fix for my problem. If anybody else has this problem, try changing line 43 to:

    root = ET.fromstring(response.text)

    I forked and created a pull request on your GitHub as well, should you choose to integrate my tweak. Thanks a lot for the script, you saved me a lot of time!

  2. Oops, forgot to actually modify the line in my first comment so here’s a repost.

    Hey there! First of all thanks a lot for your script, very helpful!
    However it did not work on my machine because of non-ASCII characters in some of my files. After doing a little bit of research I foudn a fix for my problem. If anybody else has this problem, try changing line 43 to:
    root = ET.fromstring(response.text.encode(‘utf-8’))
    I forked and created a pull request on your GitHub as well, should you choose to integrate my tweak. Thanks a lot for the script, you saved me a lot of time!

Leave a Reply

Your email address will not be published. Required fields are marked *