Topic: Help with naming syntax please!

Hi

I want my naming standard to be as follows but don't know how to write the syntax. Can anyone help please?

2Pac - 1995 - Me Against the World/2Pac - 01 - Intro.mp3
2Pac - 1995 - Me Against the World/2Pac - 02 - If I Die 2Nite.mp3

and for VA

Alternative 90's (Disc 1) - 2002/01 - Oasis - Live Forever.mp3
Alternative 90's (Disc 1) - 2002/02 - Primal Scream - Movin' On Up.mp3

Can any of you help with how to do this please? Many thanks in advance! :D

2 (edited by mfmeulenbelt 2012-04-21 17:39:47)

Re: Help with naming syntax please!

For single artist: %artist% - $left(%date%,4) - %album%/%artist% - $num(%tracknumber%,2) - %title%
For various artists: %album% $if(%discnumber%,\(Disc %discnumber%\)) - $left(%date%,4)/$num(%tracknumber%,2) - %artist% - %title%

3 (edited by kushty 2012-04-21 18:31:15)

Re: Help with naming syntax please!

F**king legend, thank you.

I forgot to say I needed the disc number for individual artists as well. I only want it to label if it is a multi disc collection. I've just tried the code below and it has labelled an album as (disc 1) but since there is only one disc I don't want it to label it with the disc. How can I do that? Thanks so much for your help.

%artist% - $left(%date%,4) - %album% $if(%discnumber%,\(Disc %discnumber%\))/%artist% - $num(%tracknumber%,2) - %title%

So it labelled the folder as:

Ghostpoet - 2011 - Peanut Butter Blues & Melancholy Jam (Disc 1)

but I want it to be as follows since it is only one disc:

Ghostpoet - 2011 - Peanut Butter Blues & Melancholy Jam

Thanks.

Re: Help with naming syntax please!

Hm. The "$if(%discnumber%,\(Disc %discnumber%\))" part is supposed to make sure it's only inserted if a disc does have a number, so it shouldn't write anything in case of a single disc release.
I won't have any time to troubleshoot this today or tomorrow, so you'll have to wait for other members (there are a lot with more scripting knowledge than me), or you could experiment yourself. There's a wiki page for Picard scripting and one for tags available within Picard.

5 (edited by ym 2012-04-22 00:39:25)

Re: Help with naming syntax please!

currently picard is writing discnumber to tag even if it is a one disc release. That's why "$if(%discnumber%,\(Disc %discnumber%\))" part will always return true. Maybe, "$if($gt(%discnumber%,1),\(Disc %discnumber%\))" might work better.

edit: my script was completely wrong ofc :)
here from the official scripting page "$if($gt(%totaldiscs%,1),Disk %discnumber% - ,)" is what you are looking for I guess.

6 (edited by kushty 2012-05-12 19:22:59)

Re: Help with naming syntax please!

I've refined the code as follows and it seems to work... except it seems to be identifying single artist albums as various artist albums. How can I fix this? Thanks!

Also, there is an extra space: between corner and the hyphen below, how do I get rid of that in the multiple artist syntax? Thanks!
Boy in da Corner  - 2003

Single artist syntax:
%artist% - $if(%date%,$left(%date%,4) - )%album% $if($gt(%totaldiscs%,1),\(Disk %discnumber%\))/

%artist% - $num(%tracknumber%,2) - %title%

Multiple artist syntax:
%album% $if($gt(%totaldiscs%,1),\(Disk %discnumber%\)) - $if(%date%,$left(%date%,4))/

$num(%tracknumber%,2) - %artist% - %title%

So in the below example, Dizzee Rascal should be:

Dizzee Rascal - 2003 - Boy in da Corner (Disc 1)


http://i.imgur.com/Oj0XH.png

http://i.imgur.com/tf0J7.png

Re: Help with naming syntax please!

You will note that it's not called "Various artist" syntax it's "Multiple Artist". The idea is to have a different syntax if a release has more than one artist for its tracks. Its existence is really a hangover from days before MusicBrainz properly handled having multiple different artists assigned to tracks. Picard considers a release multiple artist if any two track artists are different.

Exactly for the reasons outlined above, in the next Picard release, the separate "multiple artist" syntax will likely be removed and merged into the main one. People expect it to do things that it doesn't really do.

You have a couple of options for dealing with this:
1) If you want your syntax to only deal with "various artists", you could make the syntax explicitly deal with this, i.e. make both of your naming strings have $if($ne(%albumartist%,Various Artists),SA-STUFF,VA-STUFF) sections. I'd change your file naming strings to do this, but they are a pain to do because you've made the syntax quite inconsistent between "single artist" and "multiple artist" releases.

It's a side-issue, but why would you do this? Having VA releases having their multiple discs and release dates in different order than single artist ones? And having the track number and artist in different order in the file name? Obviously it's personal preference, but that seems bizarre to me. The more consistent you make your strings between the two, the fewer problems you will have due to edge cases in the database, and the easier to write/maintain the file renaming strings.

2) In the specific case you mention above with Dizzee Rascal, you could avoid this being considered multiple artist by using the "feat. artists in titles" plugin, which moves the feats to the titles. This will make Picard consider it a "single artist" release. There will, however, still be other edges cases where this won't work (e.g. releases with a bonus track attributed to a collaboration artist)

Re: Help with naming syntax please!

For a bit more discussion on upcoming Picard changes see http://forums.musicbrainz.org/viewtopic.php?id=3408 and http://i.imgur.com/Js1HT.png for a screenshot.

Re: Help with naming syntax please!

voiceinsideyou wrote:

It's a side-issue, but why would you do this? Having VA releases having their multiple discs and release dates in different order than single artist ones? And having the track number and artist in different order in the file name? Obviously it's personal preference, but that seems bizarre to me. The more consistent you make your strings between the two, the fewer problems you will have due to edge cases in the database, and the easier to write/maintain the file renaming strings.

I do the same thing with my filenames.  I prefer the form "artist - ## - title", but on a multi-artist release, this doesn't sort correctly, so I use "## - artist - title" for those.

"I say we invite opportunity inside for a nice cup of tea, then hit her on the head and steal her purse." - Kevyn Andreyasn
- Schlock Mercenary by Howard Tayler