IPB

Welcome Guest ( Log In | Register )

> foobar2000 General Forum Rules

This is NOT a tech support forum.
Tech support questions go to foobar2000 Tech Support forum instead.

See also: Hydrogenaudio Terms of Service.

 
Reply to this topicStart new topic
Disc/Total Discs and Track/Total Tracks
donstrack
post Dec 26 2012, 15:16
Post #1





Group: Members
Posts: 4
Joined: 15-December 12
Member No.: 105197



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

This post has been edited by donstrack: Dec 26 2012, 16:06
Go to the top of the page
+Quote Post
White_Shadow
post Dec 26 2012, 16:06
Post #2





Group: Members
Posts: 97
Joined: 3-May 11
Member No.: 90287



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)
Go to the top of the page
+Quote Post
donstrack
post Dec 26 2012, 16:09
Post #3





Group: Members
Posts: 4
Joined: 15-December 12
Member No.: 105197



QUOTE (White_Shadow @ Dec 26 2012, 08:06) *
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

This post has been edited by donstrack: Dec 26 2012, 16:10
Go to the top of the page
+Quote Post
White_Shadow
post Dec 26 2012, 16:15
Post #4





Group: Members
Posts: 97
Joined: 3-May 11
Member No.: 90287



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))

This post has been edited by White_Shadow: Dec 26 2012, 16:23
Go to the top of the page
+Quote Post
donstrack
post Dec 26 2012, 16:54
Post #5





Group: Members
Posts: 4
Joined: 15-December 12
Member No.: 105197



QUOTE (White_Shadow @ Dec 26 2012, 08:15) *
$ifgreater(%totaldiscs%,1,$num(%disc%,1)/$num(%totaldiscs%,1),$num(%disc%,1))


Thank you. That did it.

--DS
Go to the top of the page
+Quote Post
TuNk77
post Dec 27 2012, 23:59
Post #6





Group: Members
Posts: 137
Joined: 1-December 06
From: Norway
Member No.: 38241



I just wanted to share my string for multiple discs: ['('[Disc [%DISCNUMBER%][/%TOTALDISCS%]]')']
Go to the top of the page
+Quote Post

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



RSS Lo-Fi Version Time is now: 23rd November 2014 - 21:00