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: Disc/Total Discs and Track/Total Tracks (Read 10968 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Disc/Total Discs and Track/Total Tracks

I use MP3Tag and foobar2000 as a team. I wanted to have foobar2000 show the disc/total discs and track/total tracks. After much Googling and searching for scripts and script components in both the foobar2000 forums and the MP3Tag forums, I realized that I would have to manually set the actual total discs and actual total tracks.

In MP3Tag, in the Tag Panel, I created two new entries: Total Discs %TOTALDISCS%, and Total Tracks %TOTALTRACKS%.



Then I created a new Action called "Fix Total Discs Total Tracks.mta", with the following data:

[#0]
T=5
F=DISCNUMBER
1=$num(%DISCNUMBER%,1)/$num(%TOTALDISCS%,1)

[#1]
T=5
F=TRACK
1=$num(%TRACK%,1)/$num(%TOTALTRACKS%,1)


Usage:
In MP3Tag, select the files in a single folder/album; first one disc, then any additional discs. In the Tag Panel, based on information either from the discs or from other sources, set the total discs and total tracks for each disc selection. Then select the entire folder/album, and run the Action. Save the changes.


In foobar2000, create two new columns: Total Discs %TOTALDISCS% and Total Tracks %TOTALTRACKS%. Change the Track column to [$num(%tracknumber%,1)/$num(%TOTALTRACKS%,1)], and change the Disc column to [$num(%discnumber%,1)/$num(%TOTALDISCS%,1)]



The real question is, If there is only 1 disc, how do I stop foobar from displaying 1/1, but display 1/2, 2/2, etc. when there are multiple discs.

--DS

Disc/Total Discs and Track/Total Tracks

Reply #1
To the first question: please check, if the total disc value in the file properities (ALT-ENTER) has only one number or if there are already two separate values equiv to 2;2. This may be related to a change in version 1.1.8. See changelog for further explanation: http://www.foobar2000.org/changelog

Second problem: type for example: $num(%track number%,0)

Disc/Total Discs and Track/Total Tracks

Reply #2
To the first question: please check, if the total disc value in the file properities (ALT-ENTER) has only one number or if there are already two separate values equiv to 2;2. This may be related to a change in version 1.1.8. See changelog for further explanation: http://www.foobar2000.org/changelog

Second problem: type for example: $num(%track number%,0)

Thank you. After another hour searching, I found the proper scripts to put in the Disc and Track columns, so I changed the OP.

I vaguely recall a forum post with a script to not display 1/1, but I can't find it in my browsing history.

--DS

Disc/Total Discs and Track/Total Tracks

Reply #3
Ah! You've edited your first post... haven't seen int yet.

Try $ifgreater(%totaldiscs%,1,%disc%/%totaldiscs%,%disc%)

This should display "1", if there's only one disc and "1/2", if there are two of them. If you don't want to display the "1" either, then just leave the fourth argument empty.

[Edit:] Yey! I've forgotten the $num()-functions around the arguments:
$ifgreater(%totaldiscs%,1,$num(%disc%,1)/$num(%totaldiscs%,1),$num(%disc%,1))


Disc/Total Discs and Track/Total Tracks

Reply #5
I just wanted to share my string for multiple discs: ['('[Disc [%DISCNUMBER%][/%TOTALDISCS%]]')']

Disc/Total Discs and Track/Total Tracks

Reply #6
for completion, I add my modyfied script, which additionally checks, if tag "Disc Number" is missing, which results in showing a leading slash (/1) in some cases, where only the tag "Total Discs" is filled and the tag "Disc Number" is left empty.
Code: [Select]
[[%DISCNUMBER%]$if(%DISCNUMBER%,[/%TOTALDISCS%],[%TOTALDISCS%])]