Help - Search - Members - Calendar
Full Version: Disc Number
Mp3tag Forums > Mp3tag - International > Support
weeirdoo
Okay, so the way I have my library tags set up is, whether or not there is more than one disc, I fill in the info with Foobar: Disc Number and Total Discs

in mp3Tag, %discnumber% = Disc Number/Total Discs

So what I want to do is to check if $discnumber% is = to 1/1, and if it is, then to NOT display anything, but if it isn't, then to write "CD %discnumber%... how do I do this?

BTW, it's to create a Structure tree in my library like:

C:\My Music\Album Artist\Album\CD #(But only if it's greater than 1)\Track Number - Title.ext

If I'm going about this a convoluted way, help me with an easier way.
chrisjj
Load your files by doing Change Directory to C:\My Music (important to set current directory), and then do Convert | Tag - Filename with format string
CODE
%band%\%album%$regexp(\CD %discnumber%,(\CD 1/1)|((\CD .*)/.*),$3)\%track% %title%

This will make e.g.

C:\My Music\myalbumartist\mysinglealbum\1 track.wma
C:\My Music\myalbumartist\mydoublealbum\CD 1\1 track.wma
C:\My Music\myalbumartist\mydoublealbum\CD 2\1 track.wma
...
C:\My Music\myalbumartist\mytriplealbum\CD 3\1 track.wma
...
C:\My Music\myalbumartist\mydecuplealbum\CD 10\1 track.wma
weeirdoo
Exactly what I wanted! I used a variation:
CODE
%album artist%\%album%$regexp(\CD %discnumber%,(\CD 1/1)|((\CD .*)/.*),$3)\$num(%track%,3) - %title%

Thanks!

EDIT: Interesting though, it doesn't seem to work with anything other than mp3's. It names them correctly, but doesn't move them.

EDITx2: Actually, it seems to ignore the rule and wants to place anything other than mp3 (ogg, flac, m4a) in whatever discnumber it is, ignoring the CD 1 rule.
chrisjj
> it seems to ignore the rule and wants to place anything other than mp3 (ogg, flac,
> m4a) in whatever discnumber it is, ignoring the CD 1 rule.

Baffling. It works here on WMA.
chrisjj
Hmm... that would happen if %discnumber%'s value format differed in your other audio formats, perhaps due to a disrespectful converter. See what ALT-T tell you for the WMA's DISCNUMBER. Here it is e.g. DISCNUMBER = 3/3
weeirdoo
Sorry for late reply

You're right, I was able to fix that with flacs and oggs through mp3tag, but not even mp3tag could fix the m4a...
chrisjj
> not even mp3tag could fix the m4a...

Oh? How so?
weeirdoo
even it would still save the discnumber as 3 instead of 3/3. Manually and automatically.
chrisjj
Ah yes, now I recall m4a discnumber is number-only, so no tagger could overcome that.
dano
No, on m4a the info is split to Discnumber and Totaldiscs instead of Discnumber = x/x
chrisjj
> No

No what, Dano? Definitely m4a discnumber is number-only. And definitely no tagger can get the /qty in there.

> on m4a the info is split to Discnumber and Totaldiscs instead of Discnumber = x/x

Well fine, but surely you're not suggesting a multi-format tagger like Mp3tag should support that. And do the combine too, else show the disc number and qty in separate columns.
weeirdoo
I just converted to mp3 tongue.gif No reason for it to have been m4a.
anewman
QUOTE (weeirdoo @ Nov 17 2007, 02:17) *
Exactly what I wanted! I used a variation:
CODE
%album artist%\%album%$regexp(\CD %discnumber%,(\CD 1/1)|((\CD .*)/.*),$3)\$num(%track%,3) - %title%

I am also looking for a way to do this. However, the above does not seem to work in the current version. I.e. a folder called CD will be created for any single CD.
DetlevD
QUOTE (weeirdoo @ Nov 15 2007, 00:53) *
... So what I want to do is to check if $discnumber% is = to 1/1, and if it is, then to NOT display anything, but if it isn't, then to write "CD %discnumber%... how do I do this?...

QUOTE (anewman @ Sep 11 2011, 04:05) *
I am also looking for a way to do this. However, the above does not seem to work in the current version. I.e. a folder called CD will be created for any single CD.

The main part of the OP's request is, to create or not create a folder name string, in relation to the value in the tag-field DISCNUMBER.

For example ...
From:
DISCNUMBER = 1/1
To:
<nothing>

From:
DISCNUMBER = 2/3
To:
\CD 2

This can be achieved by the Mp3tag scripting expression ...
$if($eql(%DISCNUMBER%,'1/1'),,'\CD '$num(%DISCNUMBER%,1))

If the tag-field DISCNUMBER does not exist, then the above scripting expression returns the value '\CD 0', which might be not wanted.
For this case a small modification of the above scripting expression will return nothing.

[$if($eql(%DISCNUMBER%,'1/1'),,'\CD '$num(%DISCNUMBER%,1))]

DD.20110911.0800.CEST
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2014 Invision Power Services, Inc.