Rockbox.org home
Downloads
Release release
Dev builds dev builds
Extras extras
themes themes
Documentation
Manual manual
Wiki wiki
Device Status device status
Support
Forums forums
Mailing lists mailing lists
IRC IRC
Development
Bugs bugs
Patches patches
Dev Guide dev guide
Search



Donate

Rockbox Technical Forums


Login with username, password and session length
Home Help Search Staff List Login Register
News:

Thank You for your continued support and contributions!

+  Rockbox Technical Forums
|-+  Support and General Use
| |-+  Audio Playback, Database and Playlists
| | |-+  playlists start over
« previous next »
  • Print
Pages: 1 [2]

Author Topic: playlists start over  (Read 6138 times)

Offline fredex

  • Member
  • *
  • Posts: 52
Re: playlists start over
« Reply #15 on: November 09, 2017, 08:55:50 PM »
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].mp3
I 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!

Thanks for the idea.

Fred
Logged

Offline TheAlmightyGuru

  • Member
  • *
  • Posts: 37
Re: playlists start over
« Reply #16 on: November 10, 2017, 10:38:40 AM »
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
---relative.m3u
---MUSIC\
------song1.ogg
------song2.ogg

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

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

To perform the test, here is what I did:

Absolute
1.) 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.

Relative
1.) 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.

Thanks!
Logged

Offline jhMikeS

  • Developer
  • Member
  • *
  • Posts: 242
Re: playlists start over
« Reply #17 on: November 14, 2017, 03:50:32 PM »
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.

Will get back to you.
Logged

Offline TheAlmightyGuru

  • Member
  • *
  • Posts: 37
Re: playlists start over
« Reply #18 on: November 16, 2017, 03:06:10 PM »
Thanks jhMikeS!  :)
Logged

Offline TheAlmightyGuru

  • Member
  • *
  • Posts: 37
Re: playlists start over
« Reply #19 on: November 20, 2017, 02:00:23 PM »
I found something new that might help you in the debug process.

First, as you pointed out, proper absolute pathing requires starting with a root. I tried the following, and both songs are properly remembered:

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

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.

I hope this helps!
« Last Edit: November 20, 2017, 02:05:39 PM by TheAlmightyGuru »
Logged

Offline fredex

  • Member
  • *
  • Posts: 52
Re: playlists start over
« Reply #20 on: November 24, 2017, 02:25:51 PM »
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?

Not criticizing, just wondering.
Logged

Offline saratoga

  • Developer
  • Member
  • *
  • Posts: 8983
Re: playlists start over
« Reply #21 on: November 24, 2017, 05:41:07 PM »
m3u paths are relative to the folder containing the playlist.
Logged

Offline TheAlmightyGuru

  • Member
  • *
  • Posts: 37
Re: playlists start over
« Reply #22 on: November 29, 2017, 10:49:16 AM »
@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:

root
----Playlists
--------Playlist1.m3u
--------Playlist2.m3u
----Music
--------Artist1
------------Song1.ogg
------------Song2.ogg
--------Artist2
etc.

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.
Logged

Offline TheAlmightyGuru

  • Member
  • *
  • Posts: 37
Re: playlists start over
« Reply #23 on: January 02, 2018, 02:49:34 PM »
I'm trying to determine if this playlist bug is specific to the Sansa ClipZip, or is a general Rockbox issue, but, unfortunately, I only have a ClipZip. Could a couple other Rockbox users with different devices help me out? I've created some test files which you can download here: http://www.thealmightyguru.com/PlaylistTest.zip

To run the test, unzip the files and copy them to your device, then do the following:

1.) Using your player, open the PlaylistTest folder.
2.) Launch the Remembers.m3u playlist.
3.) Let the song play for a few seconds.
4.) Turn off your player.
5.) Turn your player back on.
6.) Rockbox should begin playing the song from where it left off as it's supposed to.

Then,

1.) Using your player, open the PlaylistTest folder.
2.) Launch the Forgets.m3u playlist.
3.) Let the song play for a few seconds.
4.) Turn off your player.
5.) Turn your player back on.
6.) Rockbox will instead start the song from the beginning.

Please let me know if you get similar results and what type of player you're using, thanks!
Logged

Offline kostkoro

  • Member
  • *
  • Posts: 18
Re: playlists start over
« Reply #24 on: August 04, 2019, 12:07:29 PM »
Hello. It is an old topic, but I'd like to contibute, with an approach inpired by what I have read here, and, hopefully, a solution. (I have already posted this in http://forums.rockbox.org/index.php/topic,48232.30.html)
I recently had the issue of playlist resuming from the very first track, after a shutdown. My player is an iRiver H340 with a Toshiba disk of 80Gb. Rockbox is 3.14.
Some playlists I added recently were behaving as above. I had compiled the playlists with Media Monkey 4.1.24.1083. I have configured it (in settings) to export m3u playlists in UTF8. I also export them in the root directory of my laptop. I use the same folder structure in both my laptop and the H340, eg. \Music\somefolder\somefolder, etc.
The tracks in these playlists were in absolute path, but driveless, and more important, with no "\" at the beggining: eg.
Music\somefolder\song1
and not: \Music\somefolder\song1
The player recognized them and played them fine, ecxept for the resume problem.
I had many other playlists with the "\" at the begining of the tracks path and the resume were fine, from the point where they had stopped.
So I changed the path (from Music\somefolder\song1 to \Music\somefolder\song1), saved the playlists, copied them to the player and the problem went away.
The change of the path was easily performed with Notepad: replace "Music" with "\Music", replace all, and save as m3u.
I hope this helps.
Logged

Offline Weaves

  • Member
  • *
  • Posts: 11
Re: playlists start over
« Reply #25 on: September 15, 2019, 04:01:36 PM »
FYI,

This did not work on my Clip Zip with 3.14.  However, my playlists is on a micro sd card.  So, that might cause different behavior. I have a Fuze with 2.13, So I will try moving it there and see what happens. 
Logged

Offline Chronon

  • Rockbox Expert
  • Member
  • *
  • Posts: 4379
Re: playlists start over
« Reply #26 on: September 30, 2019, 12:01:14 PM »
SD cards get mounted to a subdirectory of the root folder, so I would expect that absolute paths that don't get that right won't work.
Logged
Sansa e280, Gigabeat F40, Gigabeat S60, Sansa Clip+, iPod Mini 2g

  • Print
Pages: 1 [2]
« previous next »
+  Rockbox Technical Forums
|-+  Support and General Use
| |-+  Audio Playback, Database and Playlists
| | |-+  playlists start over
 

  • SMF 2.0.17 | SMF © 2019, Simple Machines
  • Rockbox Privacy Policy
  • XHTML
  • RSS
  • WAP2

Page created in 0.197 seconds with 22 queries.