How to import m3u playlist (or other playlist)

Well, yes… In fact I also thought that Kodi would have been an option to manage simple playlists… But… No !
In fact when I tried, Kodi itself (directly commanded from a computer, with mouse) seems to work fine. But Kodi + remote (Kore or Yatse) fails to play the playlists in correct order. It plays the list in alphabetics order instead of sequence order… And I definitely need the remote…

I posted something on Kodi’s forum. Maybe it’s going to be solved one day…
forum.kodi.tv/showthread.php?tid=307677

But in fact, the problem seems old (at least 2 years), Yatse members said it’s not a problem of remote, but a problem of Kodi :
yatse.tv/redmine/issues/14

So… For the moment, no solution found. When I started my raspberry hifi system adventure, I couldn’t imagine I would face such kind of problem (I thought “file explorer” would work on any software). And for the moment, I don’t understand how people manage their playlists (I assume lots of people have music in local hard-drive or NAS…)
Anyway, appart from the playlist problem, the rest works fine => Thanks for the great work ! I’ll just wait for this update !

Happen to stumble upon the plugin section of the mpd docs and it does support pls/m3u/xspf playlists when adding them in mpd.conf. Experimenting with cantata as client and it is pretty buggy. For example it does not accept any playlist format with relative paths when the path starts with ‘go dir up’ (…/).
I have ‘music’ as library root and some base folders in it:
music/cd
music/sacd
music/vinyl
music/playlists

This setup fails. I can only open the playlist when it is located at music/cd/playlist.m3u.
music/playlists/playlist.m3u does not work
music/playlist.m3u is not even shown in the mpd file browser in cantata

The playlists that do work can be added to the play queue but not added to the playlist overview and it cannot be added to a new or existing playlist (because it already is a playlist). So it is very basic and limited.
It might also work in volumio. Found in github that:

Volumio2 will have a dedicated MPD emulation interface which will be able to interact with your favorite MPD controller

Let’s hope this is part of the interface / mpd functionality.

Edit: nope does not work.

If you are using a client like mpdroid, the easiest way is to upload your M3U files to /var/lib/mpd/playlists/ Make sure the path to your files is correct: it should start with something like NAS/Music/ (Music is my alias used in menu “My Music”).
Use search and replace with regular expression (^) in a tool like notepad++ if you have to add it.

Putting playlists in /var/lib/mpd/playlists/ doesn’t work for me.

Hence I wrote a simple script m3u2volumio to convert .m3u files into volumio-conform syntax. It can be directly used using SSH and just relies on python3:

m3u2volumio filename.m3u | ssh volumio@volumiocomputer 'cat > /data/playlist/newplaylistname'

I have a long playlist of webradio’s I spread over several computers when it changes. The script works like a charm for this purpose.

unfortunately there is no easy way to import playlists
but if you use certain MPD clients they will load the playlist themselves…

the 2 i use are
on android: MPdroid play.google.com/store/apps/deta … ev.mpdroid
windows (and it is multiplatform) i use QMPD client. if the the official site isnt allowing downloads download use archive.org)
windows users look for “1.1.2 binaries for windows made by Martin Roths” and click on binaries
bitcheese.net/QMPDClient/
web.archive.org/web/20161031104 … MPDClient/

heres a list of mpd clients web.archive.org/web/20170504034 … ki/Clients (the official list was taken down by wikia)

One way to get playlist support is to use Volumio as an OpenHome receiver (instead of using its native interface to control playback).

Install MinimServer on your NAS (or PC, or wherever you store the music files), and use Kazoo/BubbleUpNP/Lumin.app/… to control playback. Any of those OpenHome ControlPoints support m3u8 playlists.

Thank you!

I’ve had some luck using Subsonic playlists over DLNA with Volumio. (Note: DLNA functionality requires Subsonic premium at $11 a year. There is a 30 day free trial). It works with MP3 and AAC files without any issues. If you have ALAC files, it’ll show the stream URL instead of the song artist/title.

I’ve had a similar result with MiniDLNA. MP3 and AAC files work as you’d expect. The ALAC files show a number instead of the song artist/title.

I really want to use M3U playlist files with Volumio too, so I developed the feature.

Here’s the pull request: github.com/volumio/Volumio2/pull/1723

I only have M3U playlists in my collection, so I’ve only tested it with the M3U format. If any of you have another format like PLS or ASX, and you find it doesn’t work like you expect, can you post a comment on the pull request please?

Hello !
To learn a little during containment, i made this python 3.6 ttk GUI to create playlists files for Volumio 2.x from my extended m3u palylists and / or xspf.
Only process extended .m3u (#EXTM3U in first line) without comment lines (#EXTREM:) and whose info lines (#EXTINF:) are said ‘standard’ (Duration,Artist - Title). Tested m3u and xspf files created by vlc. With no guarantees !
Thanks to smoneck for the idea and sample.
PLtoVolumioPL.7z (13.1 KB)

1 Like

Hi,

just ran into this and is what i was looking for.

I’m running it from a mac, do have any idea why i am getting a prompt > after i execute it?
I have enabled ssh and can login to volumio successfully.

Hey temm,

what do you mean by “prompt”? A popup-message? An error message?
Anyway, as a workaround, if you can login to Volumio via ssh, you can always execute it there as Python should be installed there.

Cheers,
Stephan

I used this today and it mostly worked. I had a complicated set of steps to get a roughly working playlist in Volumio. Prior to running these steps I had all my music on a micro-SD card plugged into a USB adapter that was plugged into one of the USB ports on my device. All the songs played fine when accessing them through the Volumio UI from my iMac.

  1. Export my two playlists in Audirvana on my Mac desktop - these are not in #EXTM3U format

  2. Import each playlist into VLC and export it in #EXTM3U format (VLC ‘lost’ some songs at this point as it showed fewer songs than I have in Audirvana with the same playlists

  3. Run PLtoVolumio for each playlist. I had to substitute the directory leading up to my music directory with the path on the USB drive (something like /mnt/USB/xxxxx…/MyMusic). It complained about literal double quotes in three of the songs for one playlist (" characters). I had to substitute these characters to get a playlist in Volumio format created

  4. Those steps were done on my iMac

  5. I then transferred both playlists on my Volumio device (RPi 4B) using scp from iMac to device into /data/playlist, then SSH’d onto the device to check that they were there

  6. Launch the Volumio UI but the playlists wouldn’t play

  7. It looked like an issue with %20 characters so I used sed to replace %20 with a literal space character in both playlist files

  8. Now both playlists played to some extent on my device!

HOWEVER - I seem to have lost some songs along the way when using the above process. As I play songs from the playlists further and further down, it is playing the wrong song (by a few songs apart).

Anyway, I’m glad I’ve got most of the contents of my two playlists across. It’s not a perfect solution as there’s no album art and some songs are missing. However, it’s a lot better than having no playlist import capability.

Many thanks for the conversion tool PLtoVolumioPL.7z !!!

I hesitated to develop one, because I want to be able to convert playlists (under Itunes) to import them into Volumio and there’s no need … It works great!

On the other hand, small improvement possible, the character " is not prohibited in Volumio playlists, it just needs to be protected by the character ** . As I am not an expert in Python language, I tested by disabling the calls to the “checksyntaxe_volumPL” function and replacing before in my m3u file, all the " characters by " and it works :wink:

I modified the checksyntaxe_volumioPL function so that it protects the characters " :

def checksyntaxe_volumioPL (liste):
    for nb in range(len(liste)): # pour chaque ligne de la liste
        if '"' in liste[nb]: # si guillemet droit présent
            liste[nb] = liste[nb].replace("\"","\\\"") # on protege le guillemet
    return liste

PLtoVolumioPL.txt (32,5 Ko) (Renamed the file .txt to .py)

Great script but has anything more basic been changed in the script? All of my output files are now named as “1” so I can’t bulk convert playlists :frowning:

I had brief look at the script but my French is not quite good enough to debug it

Evoke version or my version ? It’s strange, because on my side, both work very well …

Both version @LePtitNicolas !

In some good news- I decided to move the folder containing the playlists to my desktop (I was curious if a shorter path length might be better) - and it worked!

No idea if there is a string length limit in the variables or something… Python is not my preferred language although it does seem like I’ll have to learn it properly…

Hi guys,

Thought I’d test some of my own FLAC albums on volumio and organising some USB storage devices. I have them all tagged precisely complete with m3u files. Wondering how you are you meant to navigate or play albums so they are in order.

  • If i go Music Library → USB → Folder → Album, they aren’t in order
  • “Albums” doesn’t show any on the USB, only the internal SD card
  • Genre → xx → Album, kind of shows them in order with a few wrong ones.

Just keen to test this to see if it fits the bill before subscribing for a year,

I just want to make sure my collection doesn’t get stuffed up, but could always make read only.

Ps. Foobar with replaygain is good on the PC (but 20y old tech and too complicated to uPNP going.

Thanks,

Ps. Albums show every song in the album as it’s own cover art??