-
Notifications
You must be signed in to change notification settings - Fork 0
Parsing Problem with m3u_importer #1
Comments
Where is "07 California Dreamin.mp3" actually located from the viewpoint of Volumio? Is it "/mnt/NAS/McLeodOMV/If You Can Believe Your Eyes And Ears/07 California Dreamin.mp3" ? My brain is a bit foggy about how my code works... I'm really a C programmer, I was just pretending to be a Javascript/Typescript programmer for this project! Skip |
Skip, Your guess as to the actual location of "California Dreamin" is correct, it is in: "/mnt/NAS/McLeodOMV/If You Can Believe Your Eyes And Ears/07 California Dreamin.mp3" I hope this helps refresh what you did in coding. No apologies necessary for your coding. As a "hacker" - in the old sense of the term - I know just enough to be dangerous in some instances and clueless in others. Two additional comments:
These first two comments - as I interpreted them - relate to the location of the playlist file you are trying to import. The last sentence - I think - relates to the path of where the music is found. If so, a little clarity here would help, or better yet, and example of what the code will deal with.
Rick If you liked my Golden Oldies playlist, you might like this one too... |
One issue is that the importer expects the playlist to be located such that it would work as-is IF Volumio had .m3u support. i.e. for relative paths such as those in your playlist (../../../2CB2-D47E....) the playlist itself would have to be on your NAS in an appropriate folder. Try replacing "../../../2CB2-D47E/Music/" with "/" and then put the edited playlist in the root of your NAS and import if from there. I think that should work. Skip |
Skip,
I'm attaching two files - Golden_Oldies_v4.m3u and m3u_importer.log.
I modified the m3u file as you suggested so that the first song entry is
"/If You Can Believe Your Eyes And Ears/07 California Dreamin.mp3". I
placed the playlist file in the root directory of the NAS server, so that
it's in the same folder as all the albums. In the Settings window on the
plugin I used "NAS/McLeodOMV" as the path to the playlist. Clicking on
Import I get the same message as before - "playlist successfully imported".
But the playlist in the /data/playlist folder is still a zero length file.
I've attached the m3u_importer.log file. Looking through the log I can see
that it is ignoring all the album folders until it gets to the 119th entry
in the root directory - the playlist file. From there it tries to deal
with each entry in the playlist but still shows the "parsing error" message
for each one. After dealing with the playlist items it continues to ignore
the rest of the 366 album folders.
I'm wondering if the way I have the NAS set up is causing this issue. The
NAS serves as a repository for three different things: backup of files and
folders from my "My Documents" section of my PC, backup of my family's
Photos, and the Music used by Volumio. When I configure the Volumio unit
to use the NAS I use the alias of "McLeodOMV" and define the PATH as "\\<IP
Address>\volumio" which works fine.
Sorry to be such a bother...
Rick
…On Thu, Mar 30, 2023 at 6:16 AM Skip Hansen ***@***.***> wrote:
One issue is that the importer expects the playlist to be located such
that it would work as-is *IF* Volumio had .m3u support. i.e. for relative
paths such as those in your playlist (../../../2CB2-D47E....) the playlist
itself would have to be on your NAS in an appropriate folder.
Try replacing "../../../2CB2-D47E/Music/" with "/" and then put the edited
playlist in the root of your NAS and import if from there. I think that
should work.
Skip
—
Reply to this email directly, view it on GitHub
<#1 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AS2HJWBC5DAASJ24CMKQGGTW6WBSTANCNFSM6AAAAAAWLHSMUE>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
The attachments didn't make it for some reason. Could you try attaching by dragging and dropping them via the github issue webpage? I know what works. You're no bother, I'm glad someone is using my script. Hopefully in the end it will be worth your trouble ! Skip |
Skip, Here's the two files ... I hope. Maybe that will shed some light on this... Rick |
Rick, If you give the script a path to a directory rather than a specific file it searches for *.m3u and *.m3u8 files. Files with any other extension are ignored. Try renaming Golden_oldies_v4.txt to Golden_oldies_v4.m3u and give the script the full path, i.e. "/mnt/NAS/McLeodOMV/Golden_oldies_v4.m3u". I should have responded to your earlier comment
The last sentence applies to the playlist as well. When you have a USB flash drive the root is something like "/mnt/USB/e884c5ea-1fda-4111-97ae-499ae0a90627" which is pretty ugly and error prone to type. So ... the script drops that in the dialog so you don't have to type it. Documentation isn't my strong suite, it always makes sense to ME (grin). Skip |
Skip, The reason I sent you a playlist file with an extension of ".txt" is because Github won't allow me to attach an .m3u file to a reply. So I did use the playlist with a .m3u extension when I ran the last test. I just reran the experiment using the same .m3u playlist (Golden_Oldies_v4) but in the Settings I specified the file explicitly. I still get a file in /data/playlist with the right name, but zero file size. I'm attaching the m3u_importer.log file from this most recent run. Rick |
I've basically given up on attachments with gmail, I didn't know you couldn't attach .m3u files, but it doesn't surprise me. Interesting, the earlier log didn't have any indication that the importer found any playlists, but m3u_importer 3-31.log does and it showed the dreaded parsing error. I finally found the problem after refreshing my brain about the m3u format. Rightly or wrongly when the importer finds "#EXTM3U" on the first line of the playlist it requires an #EXTINF: line with the artist name and track title before every entry. Try deleting the first line (#EXTM3U) that should fix the parsing error. I imported your playlist on my device and it complained that it didn't find the first track as expected... Good luck! |
Skip, I made the change to the .m3u file as you suggested. Good news and bad news. The good news is that I got a different result, the bad news is that I still end up with a playlist in /data/playlist that is zero. I'm attaching a log file. Seems like the conversion to an absolute path is going wrong... Rick |
Ok, update... After looking at the log file carefully and trying a couple of things, I figured out what my .m3u file needed to look like:
Once I did those two things I was able to generate a playlist that would work. It wasn't without errors, but I figured out that something in the way the .m3u file was generated created some errors. Specifically, for the Tapestry album there was a "01-" prepending each song from that album (but not for any of the other albums). Not sure why. I've got another .m3u file that I'll try a bit later, but now at least I can get your plugin to work. Thanks for all the help! Have a great weekend! Rick |
I am glad to hear it finally did something! Hopefully now that you know how to trick into doing your bidding it will be worth the effort! Thanks for reaching out. You might have motivated me to update to Volumio 3... I really never used Volumio much after I finished the initial work on the plugin. My wife said nice things when I showed her how to use Volumio to access to all of our music, but she almost immediately went back to listening to Pandora on her iPad using the internal speakers. Sigh... Skip |
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.
Golden Oldies.txt
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:
[Something was messing up the text since there were not three periods, only two. Here is a pasted version of the first three lines of the file directly from the editor. I have also attached the original file as a .txt file]
#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: [This pasted set of text also showed the same error showing three periods instead of two]
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
Golden Oldies.txt
The text was updated successfully, but these errors were encountered: