[PLUGIN] m3u_importer

Hi Wheaten,

Thanks for giving it a try! I guess the good news is that at least it installed and ran.

Could you tell me what the path to the playlist you tired to import was and an example of where the importer looked for the track vrs where the track actually is?

Thanks,
Skip

So Both Pi’s are connected to the same NAS. Using JRiver to maintain the library as Volumio lacks this.
So a line in *.m3u looks like:
mnt/music/Steel Pulse/(1984) - Reggae Greats/1009 - Steel Pulse - Reggae Fever.flac

When importing I take the following settings:

Part of log:
import_m3u: file “1980 - 1989.m3u”
modalResult: “”
processing /mnt/NAS/QNAP//1980 - 1989.m3u
file has carrage returns and line feeds
m3uLine:0 m3uLines.length:190
convertAbsolutePath:
dir: /mnt/NAS/QNAP/
uri: /mnt/music/Steel Pulse/(1985) - Babylon the Bandit/1003 - Steel Pulse - School Boys Crush (Jail Bait) (LP Version).flac
importSimpleM3u: calling fileUri, self.uri /mnt/music/Steel Pulse/(1985) - Babylon the Bandit/1003 - Steel Pulse - School Boys Crush (Jail Bait) (LP Version).flac
artist: “1003”
title: “Steel Pulse - School Boys Crush (Jail Bait) (LP Version)”
uri line: “/mnt/music/Steel Pulse/(1985) - Babylon the Bandit/1003 - Steel Pulse - School Boys Crush (Jail Bait) (LP Version).flac”
modalResult: “”
While processing 1980 - 1989.m3u couldn’t find “/mnt/music/Steel Pulse/(1985) - Babylon the Bandit/1003 - Steel Pulse - School Boys Crush (Jail Bait) (LP Version).flac”
message: “While processing 1980 - 1989.m3u couldn’t find “1003 - Steel Pulse - School Boys Crush (Jail Bait) (LP Version).flac””
importPlaylists returning
dialog_result: answer continue
importPlaylists
fileNdx 3
file 4 of 575 modalResult “continue”
modalQuestion: “track_error”
modalResult: “continue”
calling import_m3u

It might be working with a replace structure:
find: “/mnt/music/”
replace: “mnt/NAS/QNAP/”

Yup that will probably fix it. I had thought about adding dialog fields to support renaming, but it just seemed to complicated.

All of my playlists use relative paths which aren’t problematic.

Skip

Surely I see the potential of this plugin.
Currently I need to convert my playlist via Excel, as JRiver can create them dynamically.
It’s a lot of copying…

1 Like

I’ll take another look and adding a find and replace capability.

Thanks for testing the plugin and the feedback !

Skip

Hi Skip, well done on the plugin, and thank you for including a post in the Volumio Plugins Collection.

I’ve taken the liberty of adding a link there to this topic, so people know where they can ask questions, give feedback etc.

1 Like

Just a note to anyone thinking of trying this plugin … it works for me on the V3 release after a manual plugin install.

Skip

1 Like

@Skip_Hansen signed up here to thank you for making this plugin! It seems to have some issues finding files with special characters like european letters or korean characters, but I can live with that. Overall it is great, thanks so much.

Thanks for the feedback! It’s nice to know someone has the plugin to be of value!

The only entry in my personal library that had other than ASCII characters was Déjà Vu by Crosby, Stills, Nash & Young. I had problems with it initially but I got it working so I hoped that would be good enough testing for extended characters.

If you would like to create an issue and provide an example of a failure I’ll see if there’s anything I can do. The issue tracker is here: Issues · skiphansen/volumio-plugins · GitHub

Skip

Thanks! I was able to import my MediaMonkey M3U playlists. Had to update the paths a bit to use local storage, but it worked. Used Notepad++ to do a mass update of the paths, and the plugin did the rest.

Changed the relative path from …\Music\ to \mnt\USB\MusicStorage\Music\

it just worked for me - followed the install instructions on the repo.
I have many .m3u playlists and my music is on a Buffalo LinkStation NAS (smb/cifs).

the only problem is that some track names have non-ascii letters in them
(mostly Bach, e.g., “Wer nur den lieben Gott läßt walten.wav”).
filenames must be all ascii - is this a Volumio thing?

A big thank you for the plugin that allowed me to convert my playlist from itunes!

Hi @Skip_Hansen.
Thanks for your plugin. It worked great on previous Volumio but now I’ve updated to the latest version and it seems not to work.
Have you by a chance tested it on the last release?
It might also be me to have made some mess: I had backed up all settings and I have restored them after the update, if that helps.
Thank you

I’m sorry but I haven’t played with Volumio for quite a while. I did test it on a version 3 beta back in 2021 but I haven’t revisited the project since.

For the record what version are you running?

Skip

It’s ok, Skip. My version is 3.429, of last February

1 Like

Skip,

I was happy to find that you’ve created a plugin to convert m3u playlists to the Volumio format.

However, I have not been successful in getting the plugin to work.

I am running a RaspberryPi 3 based system running Volumio 3.435.

The playlists are extended m3u playlists that come from my Android phone or tablet. The first couple of lines of the test playlist I’ve tried look like this:

#EXTM3U
…/…/…/2CB2-D47E/Music/If You Can Believe Your Eyes And Ears/07 California Dreamin.mp3
…/…/…/2CB2-D47E/Music/Good Vibrations 40th Anniversary/01 Good Vibrations.mp3

My Volumio music resides on a NAS storage unit that is mounted on “McLeodOMV” (I’m running Open Media Vault).

I installed the plugin using your manual install instructions and that worked fine. I put the playlist in /data/INTERNAL on my Volumio and entered “INTERNAL/Golden Oldies.m3u” in the Settings page of the plugin. When I click on the Import button, it says it has successfully imported the playlist.

But when I look at the /tmp/m3u_importer.log file I see this:

doImport: which=“new”, fileOrDir="/mnt/INTERNAL/Golden Oldies.m3u"
importPlaylists
fileNdx 0
file 1 of 1 modalResult “”
calling import_m3u
import_m3u: file “/mnt/INTERNAL/Golden Oldies.m3u”
modalResult: “”
processing /mnt/INTERNAL/Golden Oldies.m3u
file has line feeds
m3uLine:1 m3uLines.length:81
importExtendedM3u line 1:
…/…/…/2CB2-D47E/Music/If You Can Believe Your Eyes And Ears/07 California D
reamin.mp3
parsing error: …/…/…/2CB2-D47E/Music/If You Can Believe Your Eyes And Ears/
07 California Dreamin.mp3
importExtendedM3u line 2:
…/…/…/2CB2-D47E/Music/Good Vibrations 40th Anniversary/01 Good Vibrations.m
p3
parsing error: …/…/…/2CB2-D47E/Music/Good Vibrations 40th Anniversary/01 Go
od Vibrations.mp3

The plugin is clearly seeing the playlist, but I’m not sure what is causing the parsing error. When I look in the /data/playlist directory, I see that it has created a playlist, but it has a zero length.

Thinking that the beginning of each line in the original playlist was causing problems, I have tried a number of ways to alter the beginning of the list such as removing all of the text up to the “Music” text, replacing the beginning of each line with “NAS/McLeodOMV…”, or “mnt/NAS/McLeodOMV…” but I continue to get the “parsing error” message for each line in the playlist. I’m running out of ideas on how to modify the original playlist file so that it will import properly.

Looking at one of my playlists created on the Volumio unit I see the first entry as follows:

[{“service”:“mpd”,“uri”:“mnt/NAS/McLeodOMV/Original Musiquarium 1 [Disc 2]/2-07
I Wish.mp3”,“title”:“I Wish”,“artist”:“Stevie Wonder”,“album”:“Original Musiquar
ium 1 [Disc 2]”,“albumart”:"/albumart?cacheid=352&web=/Original%20Musiquarium%20
1%20%5BDisc%202%5D/extralarge&path=%2Fmnt%2FNAS%2FMcLeodOMV%2FOriginal%20Musiqua
rium%201%20%5BDisc%202%5D&icon=fa-tags&metadata=false"},

Can you help me figure out what I’m doing wrong?

Thanks,

Rick

I don’t understand how your original playlist works unless there’s a cut and paste issue or something.

“…/…/…/” doesn’t make sense to my brain but “…/…/…/” does. Is that what was actually in your playlist?

Skip

It looks like the forum is messing up the paths, I typed <slash> <dot> <dot> <slash> but it shows as <slash> <dot> <dot> <dot> <slash>. If you could create a issue on GitHub - skiphansen/volumio-plugins: M3U importer for Volumio and attach your log and .m3u file I’ll have a look and see if I can figure out what’s happening.

Skip

Yes, something got missed in translation here. There should be only two periods, not three. I’ve posted to your github location. Hopefully things will make more sense once you see that.

Thanks,

Rick

/../../
If you need to enter text starting with / or < use “Preformatted text” to display is properly.