Track Sorted & Genre Playlist generators and b2db sorter

76 views
Skip to first unread message

William Hope

unread,
Jan 2, 2021, 3:36:11 PM1/2/21
to Brennan Forum
Hi All,
I've had my B2 for about a week or so.

I like my CDs to play in track order since the artist did go through the effort of putting them on the album that way. Most of my FLAC files are tagged with track numbers, so I wasn't in the mood to rename 8,700+ files.

It appears that B2 sorts tracks alphabetically, so wrote a script to create a Sorted playlist with the tracks in Track order. Albums aren't sorted.

I use the b2db file to get the list of tracks.

Sorting is based on the TRACKNUMBER tag in the FLAC metadata (it may work with OGG files since they have the same metadata).  If no TRACKNUMBER tag is found, or the track numbers don't start with 1, sorting will be incomplete or unsorted.

The script will also look for a GENRE tag and create Genre playlists based on the Genres found. These lists are just sorted by how they are encountered. This can be suppressed.

I tried to do MP3s, but I'd need something like mp3info included in the Brennan OS image.

Once I restarted the B2, the newly created playlists showed up in the Playlist pulldown.

The Sorted playlist entry is limited to 5000. So I may have to break it into smaller chunks. 
 
I also have a version of the script that sorts the b2db file, but for that to work, there would need to be a way to turn off the alphabetic sort of the tracks. The folks at Brennan would have to say if that was all that was required. IMHO this would be the better solution than the Sorted playlist.

I might be willing to make my script available, but I'm not really interested in doing a lot of support. It's written in Python 2.7, which is pretty easy (although Python3 would be better).

Bill

Mark Fishman

unread,
Jan 2, 2021, 4:39:02 PM1/2/21
to Brennan Forum
If you're willing to rename the tracks so they start with the track number, then they'd sort numerically (since the numbers are already in that order). You mention OGG files; I therefore infer that you have a computer in addition to the B2. You could use a tagging editor, or the mass-tagging plugin for something like foobar2000, to read the tags and rename the files based on those. You don't have to do it entirely manually; the tagging software usually works on bunches of files at once, as long as you get the "rules" straight.

I use mp3tag (freeware, although Florian is appy to accept donations). There's even a version in the works for Mac users, to complement the Windows version that has been around for a long time. It works on FLAC, OGG, MP3, AAC, WAV, and so on.
Reply all
Reply to author
Forward
0 new messages