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
| | |-+  Directories in M3U files?
« previous next »
  • Print
Pages: [1] 2

Author Topic: Directories in M3U files?  (Read 4787 times)

Offline brianary

  • Member
  • *
  • Posts: 11
Directories in M3U files?
« on: January 28, 2008, 07:12:23 PM »
I tried hand-creating an M3U file that consisted entirely of directories, hoping the contents would be automatically added, but all of the entries show up marked with ERR.

I'd like to do something like this:

Code: [Select]
/podcasts/castA
/podcasts/castN
/podcasts/castQ

...and have the contents of each of those folders, which tend to change frequently, pulled into the current playlist.

Is this currently possible? Am I doing something wrong?
Logged

Offline cpchan

  • Member
  • *
  • Posts: 198
Re: Directories in M3U files?
« Reply #1 on: January 28, 2008, 07:22:45 PM »
Quote from: brianary on January 28, 2008, 07:12:23 PM
I'd like to do something like this:

Code: [Select]
/podcasts/castA
/podcasts/castN
/podcasts/castQ

...and have the contents of each of those folders, which tend to change frequently, pulled into the current playlist.

Is this currently possible? Am I doing something wrong?

The m3u:

http://en.wikipedia.org/wiki/M3U

spec does not allow you to do that.

Charles

Logged

Offline Llorean

  • Member
  • *
  • Posts: 12931
Re: Directories in M3U files?
« Reply #2 on: January 28, 2008, 07:27:17 PM »
I'm not sure, but I think you could just do that with a custom Tagnavi entry?
Logged

Offline brianary

  • Member
  • *
  • Posts: 11
Re: Directories in M3U files?
« Reply #3 on: January 28, 2008, 07:54:54 PM »
Good idea. I'll give that a try.

Thanks!
Logged

Offline brianary

  • Member
  • *
  • Posts: 11
Re: Directories in M3U files?
« Reply #4 on: January 29, 2008, 01:07:13 AM »
Quote from: cpchan on January 28, 2008, 07:22:45 PM
Quote from: brianary on January 28, 2008, 07:12:23 PM
I'd like to do something like this:

Code: [Select]
/podcasts/castA
/podcasts/castN
/podcasts/castQ

...and have the contents of each of those folders, which tend to change frequently, pulled into the current playlist.

Is this currently possible? Am I doing something wrong?

The m3u:

http://en.wikipedia.org/wiki/M3U

spec does not allow you to do that.

Charles




That's funny, that's the article that gave me the idea! Check out the second example.

M3U doesn't seem to be a specification in the formal sense, anyway, and its behavior for directory entries is not prohibited (at least, not that I've seen), so it seems quite reasonable behavior.
« Last Edit: January 29, 2008, 01:15:29 AM by brianary »
Logged

Offline brianary

  • Member
  • *
  • Posts: 11
Re: Directories in M3U files?
« Reply #5 on: January 29, 2008, 01:07:41 AM »
Quote from: Llorean on January 28, 2008, 07:27:17 PM
I'm not sure, but I think you could just do that with a custom Tagnavi entry?

Well, I can't figure out how to make this work through tagnavi, since there doesn't seem to be an 'or' operator provided by the filter menu syntax.

This doesn't work:

Code: [Select]
"Music" -> title = "fmt_title" ? filename ~ "/castA/" | filename ~ "/castN/" | filename ~ "/castQ/"

And, really, a playlist file is a much cleaner format to maintain.

Any other possibilities?
Logged

Offline cpchan

  • Member
  • *
  • Posts: 198
Re: Directories in M3U files?
« Reply #6 on: January 29, 2008, 01:49:52 AM »
Quote from: brianary on January 29, 2008, 01:07:13 AM
That's funny, that's the article that gave me the idea! Check out the second example.

M3U doesn't seem to be a specification in the formal sense, anyway, and its behavior for directory entries is not prohibited (at least, not that I've seen), so it seems quite reasonable behavior.

Interesting. I have never seen that or know of a program that supports that (not that I don't think it is a good idea). It must be a new winamp thing. Even in their official documentation:

http://forums.winamp.com/showthread.php?threadid=65772

it is not mentioned.

Charles

Logged

Offline cpchan

  • Member
  • *
  • Posts: 198
Re: Directories in M3U files?
« Reply #7 on: January 29, 2008, 02:18:19 AM »
Quote from: brianary on January 29, 2008, 01:07:41 AM
Well, I can't figure out how to make this work through tagnavi, since there doesn't seem to be an 'or' operator provided by the filter menu syntax.

I can't seem to find one either. I haven't really worked with tagnavi, since I very seldom use the database.

Quote
And, really, a playlist file is a much cleaner format to maintain.

Any other possibilities?

Depending on your scripting ability, this can be easily done. I would do it as part of a sync script (I use Linux) which does the following:

1. Mount the device (if you system does not auto-mount).

2. Sync the device with a set of directories on the computer with something like rsync.

3. Optionally submit the scrobbler log to last.fm and delete the log file.

4. Generate the playlist.

5. Unmount the device.

Charles
Logged

Offline bascule

  • Rockbox Expert
  • Member
  • *
  • Posts: 1298
Re: Directories in M3U files?
« Reply #8 on: January 29, 2008, 03:19:39 AM »
Quote from: brianary on January 29, 2008, 01:07:41 AM
...since there doesn't seem to be an 'or' operator provided by the filter menu syntax.

No, there isn't. But this will work if you have no other directories beginning with 'cast':

Code: [Select]
"Music" -> title = "fmt_title" ? filename ~ "/cast"

Quote from: brianary on January 29, 2008, 01:07:41 AM
And, really, a playlist file is a much cleaner format to maintain.

How's that? A database entry does not need any maintenance, because, provided 'Auto Update' is on, it always displays all the podcasts on your player without having to do anything.
Logged
DataBase fanboy and author of the totally overhauled Rockbox Sync Tool

Offline brianary

  • Member
  • *
  • Posts: 11
Re: Directories in M3U files?
« Reply #9 on: January 29, 2008, 06:55:07 PM »
Quote from: cpchan on January 29, 2008, 02:18:19 AM
Depending on your scripting ability, this can be easily done. I would do it as part of a sync script (I use Linux) which does the following:

1. Mount the device (if you system does not auto-mount).

2. Sync the device with a set of directories on the computer with something like rsync.

3. Optionally submit the scrobbler log to last.fm and delete the log file.

4. Generate the playlist.

5. Unmount the device.

Charles


Yeah, I've thought of that. I was just hoping I wouldn't have to write a script. I'm using a program that actually resides on the DAP, with Linux/Win/Mac support, so that I can download my podcasts from an arbitrary machine. I'm pretty proficient with bash and cmd.exe, but I'm not sure if the bash script would work on the Mac side. Plus, there's the whole problem of testing and maintaining a script on three platforms. I'll probably just go without rather than script a solution.  :(
Logged

Offline brianary

  • Member
  • *
  • Posts: 11
Re: Directories in M3U files?
« Reply #10 on: January 29, 2008, 07:17:25 PM »
Quote from: bascule on January 29, 2008, 03:19:39 AM
Quote from: brianary on January 29, 2008, 01:07:41 AM
...since there doesn't seem to be an 'or' operator provided by the filter menu syntax.

No, there isn't. But this will work if you have no other directories beginning with 'cast':

Code: [Select]
"Music" -> title = "fmt_title" ? filename ~ "/cast"


The idea is to break /castA/ through /castZ/ into categories.

Code: [Select]
"Music" -> title = "fmt_title" ? filename ~ "/castA/" | filename ~ "/castN/" | filename ~ "/castQ/"
"News" -> title = "fmt_title" ? filename ~ "/castC/" | filename ~ "/castJ/" | filename ~ "/castY/"
"Comedy" -> title = "fmt_title" ? filename ~ "/castD/" | filename ~ "/castE/" | filename ~ "/castR/"

Quote from: bascule on January 29, 2008, 03:19:39 AM
Quote from: brianary on January 29, 2008, 01:07:41 AM
And, really, a playlist file is a much cleaner format to maintain.

How's that? A database entry does not need any maintenance, because, provided 'Auto Update' is on, it always displays all the podcasts on your player without having to do anything.

Maintenance in the sense that as I add and remove podcasts (directories), rebuilding the playlist automatically seems far easier than preserving all the additional syntax required by tagnavi.

I guess what I'm really looking for is "genre" support, without having to be the "genre police" for all the podcasts I listen to. I doubt the BBC, CBC, NPR, Decoder Ring Theatre, etc would be particularly sympathetic to my request that they update their genre field. I've tried any number of tools to set the actual genre field in the ID3, but with only limited success: too often the tool clobbers tags that aren't in exactly the right format, or the Rockbox database doesn't read the tag correctly (I'd set the genre to "Book", and several tracks would read as "Boo"; or, I'd set "Music" and there'd be several entries for "Mu", "Musi", etc.); but, most of all, I'd rather not have to maintain script(s) to set genre fields anymore.
Logged

Offline Llorean

  • Member
  • *
  • Posts: 12931
Re: Directories in M3U files?
« Reply #11 on: January 29, 2008, 07:19:49 PM »
Then why don't you create a folder called /News, put all the News podcasts into subfolders of it, create one called /Comedy, and put all the comedy ones into subfolders of it, etc?
Logged

Offline cpchan

  • Member
  • *
  • Posts: 198
Re: Directories in M3U files?
« Reply #12 on: January 29, 2008, 09:50:31 PM »
Quote from: brianary on January 29, 2008, 06:55:07 PM
but I'm not sure if the bash script would work on the Mac side.


Bash does work on OS X. From what I have read, it is the default shell from Tiger and up. For system less than Tiger, you can get it here:

http://www.savagetranscendental.com/data/OSX/bash-osx.html

Don't know why they default to a C shell before that.

Quote
Plus, there's the whole problem of testing and maintaining a script on three platforms. I'll probably just go without rather than script a solution.  :(

I don't think your device will change much. Maintaining it shouldn't be that hard.

Charles
« Last Edit: January 29, 2008, 09:56:05 PM by cpchan »
Logged

Offline brianary

  • Member
  • *
  • Posts: 11
Re: Directories in M3U files?
« Reply #13 on: January 30, 2008, 12:15:48 AM »
Quote from: Llorean on January 29, 2008, 07:19:49 PM
Then why don't you create a folder called /News, put all the News podcasts into subfolders of it, create one called /Comedy, and put all the comedy ones into subfolders of it, etc?

Sadly, the podcatcher software doesn't support that (yet).
Logged

Offline brianary

  • Member
  • *
  • Posts: 11
Re: Directories in M3U files?
« Reply #14 on: January 30, 2008, 12:28:06 AM »
Quote from: cpchan on January 29, 2008, 09:50:31 PM

I don't think your device will change much. Maintaining it shouldn't be that hard.


I was thinking more about when I add and delete podcasts, or if I decide to move a podcast between categories.

I don't mean to be as dismissive as I must sound. Rockbox is far superior to anything I can compare it to, and I greatly appreciate everyone here willing to take the time to help. I've hit my head against this wall for a while now, and I was hoping I just missed something obvious.

It's too bad FAT32 doesn't support hardlinks, or I'd add the folders to category locations in addition to the location the podcatcher puts them.

It sounds like the best way forward is to create the directory playlists, and build a bash script and a windows command script to expand all of the music files (mp3, ogg, not cover.bmp, ...) in each of those directories. I guess if I keep it simple enough, I won't have to update the scripts, just the directory lists.

Hmmm... I might also investigate creating something that runs on Rockbox itself...
Logged

  • Print
Pages: [1] 2
« previous next »
+  Rockbox Technical Forums
|-+  Support and General Use
| |-+  Audio Playback, Database and Playlists
| | |-+  Directories in M3U files?
 

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

Page created in 0.089 seconds with 14 queries.