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.

tag 'script' to print out DISC 1, DISC 2.. etc
diypig
post Nov 17 2012, 16:24
Post #1





Group: Members
Posts: 97
Joined: 3-February 08
Member No.: 51013



hi, i had a look through the wiki at conditional tagging, and i tried looking on google, but i'm still stuck.
i make a lot of use out of foobar's 'file operations' menu, i use the 'move to' option, and use it to organize my music into folders that makes everything more managable.

at the moment i have something like this:

CODE
%album artist%/%album%[ '('%date%')']/%tracknumber% - %title%


i'm not sure why the date in enclosed in the square brackets, but it has been like that for months and it works smile.gif
could anyone explain what the square brackets do?

i have a problem when i come across a release with multiple disks, it wants to put all of the tracks in the one release directory.

i want something like this:

album artist
-album (date)
--DISC 1
---01 - etc etc etc.flac
---02 - etc etc etc.flac
--DISC 2
---01 - etc etc etc.flac
---02 - etc etc etc.flac

i was hoping that someone could help me with the syntax/code to make this possible smile.gif
is it possible to ignore the disc folder if there is only 1 disc? as in, if the disk total tag, or whatever it is called, is 1, or empty, then to simply ignore making the disc subfolders?

thank you very much for this, i appreciate it!

p.s. also, what is the difference between using $meta(something..) and %something%? are they interchangeable?
thanks again smile.gif
Go to the top of the page
+Quote Post
 
Start new topic
Replies
diypig
post Nov 17 2012, 18:45
Post #2





Group: Members
Posts: 97
Joined: 3-February 08
Member No.: 51013



oh wow! thank you so much!
ah, ok, i had a feeling it was something like that (the [ ] thing), thanks.
and ah, thanks for the $meta explanation!
so when it is not a special case like artist, or some thing else maybe (you said %artist% will check some tags in order, but $meta(artist) will only use artist), but if i were to use $meta(customtag) and %customtag%, there is no difference right? that is what i assume smile.gif


hmm, things get a bit tricky, people say it is your own preference etc, but, of course, some people do not know all of the options available to them, so, in what other ways could i do it? you say it can be done with more complicated code, but, what would be the point, if that what you gave me does it?
don't get me wrong, i am not trying to be critical at all, i just want to understand how else it could be done smile.gif
thank you for offering to help/adjust things!

so, my files are tagged quite simply i think, nothing rally out of the ordinary.
by that i mean, i use the artist, album artist, track, date, track/total track, disc/total disc tags, an extra custom tag or two but that is not in the file names at all.
i avoid genre, i personally really hate it, that is just me smile.gif i don't find that i can apply a 'genre' to some bands, some albums, .. etc.
i have about 250GB of flac files, i store them on my computer, and for use on my iPod (240gb hard drive)

the way you have me will work perfectly for my tags and for the layout i want!
i suppose i could change it to [DISC %discnumber% - %discsubtitle%/] or something, some discs have a 'name', but sure, i didn't realise it was as simple as that.

ah, wait, hmm... ok, so if i have this: [DISC %discnumber%/] it will only show, and insert that folder if there is an entry in discnumber, but what if i have two tags, like that example i put above, with the subtitle. what if one existed, but one did not? would i have to change it to this?:
[DISC %discnumber%[ - %discsubtitle%]/]
thank you for all of your help!

-edit. and yeah, i store my files how i showed in the first post, firstly i have the album artist as a folder, then release with the year in brackets as a folder, then the file like 01 - title.flac. i doubt that is so different to most people smile.gif

This post has been edited by joshuatm: Nov 17 2012, 18:50
Go to the top of the page
+Quote Post
Daeron
post Nov 17 2012, 22:44
Post #3





Group: Members
Posts: 422
Joined: 9-October 08
Member No.: 59818



QUOTE (joshuatm @ Nov 17 2012, 12:45) *
but if i were to use $meta(customtag) and %customtag%, there is no difference right?

If the tag is missing, the latter will return '?' instead of nothing. I suppose '$meta(test)' and '[%test%]' should be equal in that case, though.

QUOTE (joshuatm @ Nov 17 2012, 12:45) *
people say it is your own preference etc, but, of course, some people do not know all of the options available to them, so, in what other ways could i do it?

The core of the problem is that foobar (at least as far as the titleformatting goes) evaluates each file independently. That means if the track('s metadata) from Disc 1 does not specifically states somewhere that there should be a second Disc (regardless if it actually exists), you can't decide whether you should nest your folder deeper (as you might create a '\Disc 1\' when there aren't multiple discs).

The way to store those informations is what might differ. Some prefer to keep both values in the single DISCNUMBER tag as 1/2 (discnumber/totaldiscs) or just use the second TOTALDISCS tag separately. The additional work would be to create a code that retrieves that data and decides whether a subfolder should be created. The code a gave you simply decides it based on whether the tag exists at all.

It is probably not the most conventional method, but it gets the job done. With that said though, you might have to keep retagging newly downloaded files (which you might do anyway). Also other media players (following whatever standards) might not be able to understand what your tags mean. Once you have do have a way to distinguish between your files though, you'll be able to easily re-tag them according to whatever naming standards freely.

QUOTE (joshuatm @ Nov 17 2012, 12:45) *
i avoid genre, i personally really hate it, that is just me smile.gif i don't find that i can apply a 'genre' to some bands, some albums, .. etc.

You can use multi-value tags to define multiple genres. Although compability might be a concern. I have no idea whether an iPod supports that.

QUOTE (joshuatm @ Nov 17 2012, 12:45) *
but what if i have two tags, like that example i put above, with the subtitle. what if one existed, but one did not? would i have to change it to this?: [DISC %discnumber%[ - %discsubtitle%]/]

If the latter exist, the second part will be shown regardless. You can use '$if(%discnumber%,%discnumber%[ - %discsubtitle%],)' if you want to make sure, although I suppose the latter shouldn't exist at all without the former if your files are properly tagged.

This post has been edited by Daeron: Nov 17 2012, 22:47
Go to the top of the page
+Quote Post

Posts in this topic


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: 31st October 2014 - 05:12