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: Suggestion: Special Case for Total Discs = 1 (Read 795 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Suggestion: Special Case for Total Discs = 1

Whenever an audio file is tagged with Disc Numbers, Foobar2000 switches to an alternate way of displaying information. Tracks are then prefixed with the CD number, the current song in the title adds CD1, etc.

But this information is redundant if Total Discs is also 1. One solution is to empty the Disc Number tag, then the program switches to the other way of displaying information.

But I suggest it could take into consideration Total Discs, and only display disc number if total discs is unspecified or greater than one. In summary "not equals" 1.

This could also be an advanced option. Defaulting to the new behavior.

Re: Suggestion: Special Case for Total Discs = 1

Reply #1
You can change the way disc numbers are displayed using title formatting. I do this for the same reason, in the titlebar, like so:

Code: [Select]
[$if(%discnumber%,$ifgreater(%totaldiscs%,1,'(Disc '%discnumber%$if(%totaldiscs%,'/'%totaldiscs%')',']'),),)]

Re: Suggestion: Special Case for Total Discs = 1

Reply #2
This sounds very helpful, and on point to what I was asking, I'll try it later, thank you.

But there are still a few more fields all over the program?

EDIT:
I think I managed what I wanted by replacing:
Code: [Select]
[ CD%discnumber%]
with :
Code: [Select]
$ifequal(%totaldiscs%,1,,[ CD%discnumber%])

Which pretty much is saying, if totaldiscs equals 1, return an empty string, and don't expose the discnumbers.
If it's not, meaning it's unknown, or another number, then return a string matching the original behavior.

Still need to figure out the rest of the program.


Re: Suggestion: Special Case for Total Discs = 1

Reply #3
This seems to do the trick for the track columns. A custom column:
Name: Track #
Pattern: $ifequal(%totaldiscs%,1,,[%discnumber%.])[%tracknumber%]
Alignment: right

Then just add the new column and remove the other one. You can have them side by side if you want to compare the results.

The Logic is if totaldiscs is exactly 1, it appends nothing and continues with just the tracknumber.
Otherwise it appends the disc number if it exists.

EDIT:
Now all I have to do is ADD a totaldiscs fields to any collection that has discnumbers but missing totaldiscs. Instead of removing any metadata.

EDIT2:
Found some songs with both compound tracknumbers looking like "1/15" and compound discnumbers like "1/2". But without total tracks or total discs. No quick fix for these just yet. I guess I'd have to just edit the tags.