Skip to main content

Notice

Please note that most of the software linked on this forum is likely to be safe to use. If you are unsure, feel free to ask in the relevant topics, or send a private message to an administrator or moderator. To help curb the problems of false positives, or in the event that you do find actual malware, you can contribute through the article linked here.
Topic: Bug report: incorrect sorting for this track (Read 794 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Bug report: incorrect sorting for this track

I have a music track that is behaving weirdly. When I inspect it in mp3tag, it looks normal with 68/70 as track number and 5/5 as disc number. But when I drag it along with the rest of the album into foobar2000, it gets displayed with track number 68 and disc number 5. Using "%discnumber%|%tracknumber%" to sort incoming files, it is also not sorted to the correct position, but to the very end of the list. However, when I click on "track no" to sort it again, it IS sorted to the correct position.
Could you maybe check out what's going on here? I have attached the file (it's a free download from OCRemix so it should be okay to share).

Re: Bug report: incorrect sorting for this track

Reply #1
Can't reproduce any problem. Though when I downloaded the original work from OCRemix this track has track number 1 and disc number 5, so it seems you have retagged it manually.
I renumbered the original work the same way as you did and dragged them together with the sample you uploaded into foobar2000 v1.6.7. Using "sort incoming files by" string "%discnumber%|%tracknumber%" sorted your track at the 68th position, leaving tracks 69 and 70 beneath it.

Note that you can make foobar's playlist show total track count and total disc count too. And you can see them at any time using the properties dialog.

Re: Bug report: incorrect sorting for this track

Reply #2
Correct, I retagged the tracknumbers, but all the other tracks are correctly displayed in foobar, only this one is not. I also redownloaded this track in case it got corrupted and it also gets displayed incorrectly when I don't retag it, as track 1, disc 5, instead of 1/3, 5/5.
And I did set foobar to display total the track number it just doesn't work for this track. I attached a screenshot.
No idea why it doesn't reproduce, I use the latest version, 1.6.7.
Even when I clear all the tags, export the audio into a new mp3 file with audacity, and then tag it again, foobar STILL does not display or sort it correctly. I am baffled.

Re: Bug report: incorrect sorting for this track

Reply #3
I think I figured it out. I downloaded the FLAC version of the album, but this one song, track 68 only exists as mp3. So I have 69 flacs and one mp3 and for some reason, foobar treats flacs and mp3s differently. When I re-encode one of the flacs to mp3, then it, too, gets displayed without the total track or disc number and it too gets sorted below all other flac files. There isn't anything wrong with the mp3, there is a bug in foobar that makes it treat flacs and mp3s (and possibly other formats too) inconsistently. The reason you were not able to reproduce the bug was because you downloaded the mp3 version of the album.
I should also mention that I use the default "Track no" column to display the track number. I have no strong feelings whether it should include the total track number, it only needs to be consistent. I should also repeat that the tracks DO get sorted correctly when I click on that column, they only are sorted incorrectly after I open the songs in foobar with the aforementioned default sorting.

 

Re: Bug report: incorrect sorting for this track

Reply #4
The .zip has this one as disc number 5, track number 1. There is no "68" there. Don't know how you got "68", but it is not unexpected to have track "68" below tracks "2" and "3".

Also, note that FLAC and MP3 use different tagging schemes.

Last two months' worth of foobar2000.org ad revenue has been donated to support war refugees from Ukraine: https://www.foobar2000.org/

Re: Bug report: incorrect sorting for this track

Reply #5
The .zip has this one as disc number 5, track number 1. There is no "68" there. Don't know how you got "68", but it is not unexpected to have track "68" below tracks "2" and "3".

Also, note that FLAC and MP3 use different tagging schemes.
Like I said, I retagged the tracks. There are 70 tracks across the 5 albums and I tagged them 1 to 70. Just a personal preference. Track 68 corresponds to disc 5, track 1. As you can see in the screenshot above, track 68 is under #69 and #70.

Re: Bug report: incorrect sorting for this track

Reply #6
I downloaded the FLACs. This is not a foobar2000 bug. Someone has tagged the FLACs so that tracknumber and discnumber fields include the total counts. For example the first track literally has track number as "1/19" and disc number as "1/5". These tags are pure text and support such nonsense.

Re: Bug report: incorrect sorting for this track

Reply #7
I tagged both the flacs as well as the mp3 file in mp3tag with track number and disc number x/y. You mentioned that mp3 and flac have different tagging formats. Are you saying that, even though flac files and mp3 files look the same in the program mp3tag, in actuality the mp3's get tagged properly and the flacs don't?

Re: Bug report: incorrect sorting for this track

Reply #8
Open file Properties (right click on track in playlist -> Properties) in foobar2000 and inspect. Track number must be in Track Number field, total tracks count in Total Tracks Field, disc number in Disc Number field, total discs count in Total Discs field. There should be no such thing as "1/10" in Track Number field or Disc Number field. If something like this is presented, you need to re-tag you files correctly.

Re: Bug report: incorrect sorting for this track

Reply #9
I tagged both the flacs as well as the mp3 file in mp3tag with track number and disc number x/y.
Which is to say, you didn't touch disc number?
Last two months' worth of foobar2000.org ad revenue has been donated to support war refugees from Ukraine: https://www.foobar2000.org/

Re: Bug report: incorrect sorting for this track

Reply #10
Correct, I retagged the tracknumbers, but all the other tracks are correctly displayed in foobar, only this one is not.
Based on your screenshot here (reply #2), the FLACs are not tagged correctly (as Case said). The MP3 is correct. The tagging needs to be consistent for it to sort correctly.

(How strange that mp3tag is doing it that way?)

Re: Bug report: incorrect sorting for this track

Reply #11
Okay, you are right. I inspected the tracks in foobar and it is as you say. The total is in its own tag for the mp3 file and it's inside the tracknumber tag for the flac files.
I can't comment on how wrong this way to tag flacs is. Even the file explorer reads a track number "x/y" as "x" and I tried two other music players (aimp and winyl) and they both interpret the string "x/y" as track#: x, total: y.
In lights of that, it would be nice if foobar made an effort to interpret this way of tagging. Mp3tag is a very common tag editor, so even if this is indeed invalid, then there must be loads of music out there that is invalidly tagged in this specific way.

Re: Bug report: incorrect sorting for this track

Reply #12
There are other applications that tag as x/y yes.

And for FLAC tags it isn't ... "wrong". There is nothing that says you cannot have the tracknumber tag or the discnumber tag populated with the value "thirty-eight out of seventy-six". It just isn't convenient.

As an aside, the ID3 tagging scheme did - up to 2.3 - use "/" as field separator. Meaning, AC/DC would be two artists, "AC" and "DC". Obviously there was a need for workarounds.
Last two months' worth of foobar2000.org ad revenue has been donated to support war refugees from Ukraine: https://www.foobar2000.org/

Re: Bug report: incorrect sorting for this track

Reply #13
By the way, this behavior of Mp3tag affects not only Track Number in Vorbis Comments but also Disc Number.
Problem also happens with Disc Number in APEv2, but for other reason: Mp3tag uses "Discnumber" for Disc Number in APEv2 instead of recommended "Disc"
Here is script for foo_masstag to rewrite Track Number/Total Tracks and Disc Number/Total Discs if they have "/"