Author
Topic: playlists start over (Read 1315 times)

Guru:All my playlists have the absolute path to the audio files, e.g:/<microSD1>/AUDIOBOOKS/Lois-Mcmaster-Bujold/TheSharingKnife/Beguilement/The Sharing Knife, Vol. 1 Beguilement (Unabridged) [File 01 of 19].mp3I made a directory named "Playlists" on the root of the builtin storage. all the audio files go in a directory tree on the microSD card. the program I use to generate the playlists is coded to use the runtime path instead of the path of the folder when it is mounted as a Linux filesystem, so if the SD card is mounted as "/run/media/fredex/AUDIOBOOKS/... it replaces the "/run/media/fredex" with "/<microSD1>" which works fine on dozens of playlists.

and, I just recently played thru one of the playlists that always misbehaves, and this time it worked fine. Go figure!

Interesting, it seems like the problem isn't just related to absolute or relative paths, I wonder if there are two similar issues.

I just updated to the latest build, but I'm still seeing the same behavior with absolute versus relative pathing on mine. A relative path playlist -always- loses its place and resets to the beginning of the first track when I shut off my ClipZip while an absolute path playlist properly remembers the track and position.

If you have time, could you test this behavior on yours? Here is my file structure:

absolute.m3u contains the following lines:MUSIC\song1.oggMUSIC\song2.ogg

relative.m3u contains the following lines:.\MUSIC\song1.ogg.\MUSIC\song2.ogg

To perform the test, here is what I did:

Absolute1.) Open the files list, and run absolute.m3u and song1.ogg begins playing.2.) Push right to start song2.ogg. Let it play a few seconds in.3.) Turn off the ClipZip by pressing power.4.) Turn on the ClipZip with the power button.5.) song2.ogg continues to play from the same track location as when it was shut off.

Relative1.) Open the files list, and run relative.m3u and song 1 begins playing.2.) Push right to start song2.ogg. Let it play a few seconds in.3.) Turn off the ClipZip by pressing power.4.) Turn on the ClipZip with the power button.5.) song1.ogg plays from the very beginning.

Sure, I'll try it ASAP. Those are all relative paths since the don't start with "/" (root). The only difference is the explicit current-directory dot.

I do have a playlist with paths of the form "./a/b/c/d.xxx" (and "a/b/c/d.xxx", "/a/b/../c/d.xxx", etc.) and the tracks do in fact resume just fine. It was created for the purpose of testing path code and playlist behavior with new file code. The only difference it is a mix of various path forms.

I also tried using a relative double-dot parent path; both songs forget, just like a single dot:

..\Music\Artist\Song 1.ogg..\Music\Artist\Song 2.ogg

Next, I tried a mixed playlist like this, and unexpectedly, both songs are properly remembered, even the relative path:

\<microSD1>\Music\Artist\Song 1.ogg.\Music\Artist\Song 2.ogg

But, interestingly, when I reverse the order, the second song is remembered, but the first song is not:

.\Music\Artist\Song 1.ogg\<microSD1>\Music\Artist\Song 2.ogg

I'm guessing that, when a playlist is loaded, a flag is supposed to be set. In version 3.13, the flag was always set no matter what path type was used. However, in 3.14, something was changed so that the flag would not be set on a line that begins with a dot.

This would explain why my third test remembers the position of the relative path track (because a non-dot path track was played first and set the flag), and also why in my fourth test the relative path track did not work (because a non-dot path track had not been played to set the flag). And also why in my previous tests a path without a slash or dot would be remembered properly.

Gee, I never considered using relative paths within a playlist, because I had no idea what the CWD is when invoking a playlist, nor how to find out. if it was Linux I could write a shellscript to find out, I guess. how does one find out?

I haven't seen it documented anywhere, so I wonder why you would assume relative paths to the files listed in a playlist would find the actual files?

@fredex: I find that relative-path playlists are more modular. As Saratoga said, M3Us with a relative path start in the folder where the M3U file is located. On my SD card, I keep my files stored like so:

By using a relative path in the M3U playlists, I can plug my ClipZip into my PC, and load the playlist in foobar2000, and it will find all the songs properly. Or, I can take the SD card out, pop it into a phone or tablet, and the playlists will work there too. This way I only ever have to maintain a single playlist collection and it will work on every device and program I use; it's pretty convenient.

When I started using Rockbox, I just assumed relative path playlists would work, and for several years, it has supported them just fine. Rockbox still finds the songs properly, the only problem (since version 3.14+) is remembering where the playlist left off.