Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

%TRACKNUMBER% in Edit -> Sort By -> Custom not working, but %tracknumber% is #3153

Open
origintopleft opened this issue Feb 15, 2025 · 5 comments
Labels

Comments

@origintopleft
Copy link

Consider this (simplified) sort string (with usage of $num applied to accomodate #1607):

%ARTIST% - %ALBUM% - %DISCNUMBER% - $num(%TRACK NUMBER%,3) - %TITLE% - %FILENAME%

The expected behavior is to sort the playlist in the following order: Artist, Album, Disc, Track#, Title, and finally by filename if a disambiguation is required. And indeed, for all other fields, this sort string seems to be working exactly as it would in fb2k. Yet for some reason, neither %tracknumber% nor %track number% seem to be taking effect in the sort string, and it's skipping ahead straight to title.

DeaDBeeF seems otherwise capable of reading track numbers, and indeed, adding the same track number representation to a custom playlist column seems to work as expected:

Playlist screenshot

@Oleksiy-Yakovenko
Copy link
Member

Have you tried adding a new column to playlist with the same titleformatting, to test whether it contains the track numbers that you expect?

@origintopleft
Copy link
Author

I have now, and the behavior changes:

Image

Those same fields for disc and track number work fine in a column by themselves, but when combined with artist title and everything else, it seems to drop most fields and stick to artist - title - album only.

@origintopleft
Copy link
Author

I copied and pasted the disc number column into the sort string column, just as a sanity check, and it started working that way, so I took a quick comparison.

It seems that while %TRACKNUMBER% doesn't work, %tracknumber% (all lower case) does.

Image

Threw it into the actual sorting function, and sure enough:

Image

I'm not sure what the spec says about this, but from my end of things, "just make everything lowercase" is a fix enough for me.

@Oleksiy-Yakovenko
Copy link
Member

For some reason, it works for me when %track number% is lowercase, but not uppercase. I'm not sure why, but looks like a bug. I'll fix when I get to it -- but pls try to use lowercase string in the meantime. Hope it helps.

@Oleksiy-Yakovenko
Copy link
Member

lol we came to find the same thing at the same time :)

@origintopleft origintopleft changed the title %tracknumber% in Edit -> Sort By -> Custom not working %TRACKNUMBER% in Edit -> Sort By -> Custom not working, but %tracknumber% is Feb 15, 2025
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants