How to deal with albums

Hi I love the program absolutly in love i have on question and its more like a howto or netiquete

How to deal with allot of single files ?
If i scan them they end up in allot of sub albums with only one file in it.

Is this prefered ? or is there a better way to deal with it ?

I’m not sure I understand your question. If you have a lot of files that are tracks from different albums (e.g. because you don’t download complete albums, just individual tracks), then yes, that is normal. Picard is an album-oriented tagger.

If you have the complete album but Picard assigns the tracks to different releases, you can simply drag and drop the tracks to one of the releases, to keep them together. This happens because an album can have many releases: the original one, others with bonus tracks, remasters, etc. You can see other releases by right clicking the release title and then selecting “other versions”.

I do think that Picard could do a better job of keeping tracks together when scanning a full album, though.

1 Like

Yes what i mean is more like a experiance question how do most of you deal with it as in the following options:

  1. have many albums with only one track in it.

  2. import everything try to bundel it as mutch into multi singles albums (like top 40 hits or something albums)

  3. use a plugin to assing them without album.

hope that clears my question up a bit
I am Leaning to option 2 but as far as i can see i can not automate that and musicbrainz dus not the best job to put as most files as posible to gether in albums ?

I personally try to buy full albums when possible rather than just a track or two from them, but I do follow a number of internet artists who primarily release songs individually, which might involve some of the same practical concerns. Namely, I don’t want a lot of folders containing only a single file (plus the cover art, which this admittedly handles poorly; I should probably turn off “Save cover images as separate files”) and would rather those single-track releases be saved to the artist’s root directory. I’ve just added a couple lines to my naming script yesterday that seem to do that pretty nicely:

$noop(I'd rather not save Picard's default album name to the tags)
$if($eq(%album%,[non-album tracks]),$unset(album)$unset(albumsort))
$noop(If neither album name is set, or if the album consists of a single track, put it in the artist's root)
$set(_savealbum,$if($or($not(%albumsort%%album%),$and($or($not(%totaldiscs%),$lte(%totaldiscs%,1)),$or($not(%totaltracks%),$lte(%totaltracks%,1)))),
	,
	$if2(%albumsort%,%album%)/
))

EDIT: I changed Picard’s default string on my installation, so I’ve updated the above to properly reflect the default.

And then use %_savealbum% when I want to refer to the album folder. You’ll need to edit the $if conditions if you want it to work for partial albums as well (probably by adding $lte($matchedtracks(),1) or whatever other threshold you want, but be careful of full albums smaller than the threshold if you raise it). That also only helps file organization as it is, but it can be adapted easily enough to remove album tags for organization in iTunes or whatever else you use – I can put something together if you give me a better idea of what you want, or if you want to mess with it yourself, you’ll probably want to pull the $if to the outside of the $set, and leave the MBIDs in the tags so Picard will be able to pull up the proper data the next time.

I do want to mention that Picard can be overly slow if you try adding your entire library at once; and that assigning the tracks to fit compilation albums will miss any relationships set for the album as a whole, as well as the obvious differences like dates. Also, I might be reading too much into your use of “netiquette”, but the only thing Picard can do to your files that will affect anybody else is if you rate tracks/albums, and that’s only visual – the program reads from the MB database, but it doesn’t write anything in return. If you wind up editing things on the website, you will need to figure out our preferred styles, but until then you can simply do whatever looks best for you.

The issue with automatically bundling everything into compilation albums (beyond the fact that most people here really rather their tags reflect the actual source) is that there’s no easy way of figuring out what “best” means: least albums overall? highest average fill percentage? something else? Even if you do choose one, actually reaching that is surprisingly hard for computers to do, and that’s assuming Picard knows every track in your library rather than just the subset you’ve added any particular time.

2 Likes

Thanks for the extensive explanation love it and helps me decide.

Your script wil remove the album tag as wel then for these files ? Or keep it and just save then in the artis dir ?
Could you walk me trough the script my scripting writing dates back to some batch script so i do understand part if it.

I think i wil use it and sort it based on artist and only use albums for where i have albums i listen to very specific songs i could like maybe 3 songs of one artist and hate the rest.

Definitely happy to walk you through!

$if($eq(%album%,[non-album tracks]),$unset(album)$unset(albumsort))

This does remove the album from the tags, but only if it uses Picard’s default for non-album tracks – I’ve changed how it displays on my install, which is why I used “standalone” before, but you’ll obviously want it to match your own version. If you’d rather leave that on the file, I’ll include a line doing so further down. Personally, I’m perfectly happy having the “album” field be blank for recordings without any associated release. You may also want to add $unset calls for discnumber, totaldiscs, tracknumber, and totaltracks if you’re being more aggressive in removing albums.

Basically, this is a standard conditional test; if the equality between the variable and the constant string returns true, run the two $unset calls after the comma to clear the variables. As a note, surrounding a variable name in percent signs (like in the $eq) means to get the value stored in it, while using it without (in the $unsets) will either – depending on context – refer to the variable itself or just be a plain string. I’m not sure how much this comes up in Batch, but it’s probably better to think of variable names as keys into a string-string table rather than as special objects.

$set(_savealbum,$if($or($not(%albumsort%%album%),$and($or($not(%totaldiscs%),$lte(%totaldiscs%,1)),$or($not(%totaltracks%),$lte(%totaltracks%,1)))),
	,
	$if2(%albumsort%,%album%)/
))

$set is unsurprisingly the opposite of $unset; in this case, it’s basically saying "store the result of the $if under the name _savealbum. This brings up the second important thing about variables: if they’re prefixed with an underscore, you can use them as much as you want in Picard but they won’t be saved to the file. If we used the name savealbum without a leading underscore, the file name wouldn’t change at all, but there’d be an extra text field with our chosen album folder hidden in the file. That won’t affect anything in terms of playability, but it’s unnecessary cruft and will show up if you ever have reason to look at the metadata.

Breaking that down further:

$if($or($not(%albumsort%%album%),$and($or($not(%totaldiscs%),$lte(%totaldiscs%,1)),$or($not(%totaltracks%),$lte(%totaltracks%,1)))),

this is just a really detailed condition to check if a file should be treated as a standalone recording. If you wanted to leave [non-album tracks] in the tags, then you’d delete the first line unsetting the album variables and add its $eq(%album%,[non-album tracks]) in here:

$if($or($eq(%album%,[non-album tracks]),$not(%albumsort%%album%),$and($or($not(%totaldiscs%),$lte(%totaldiscs%,1)),$or($not(%totaltracks%),$lte(%totaltracks%,1)))),

otherwise, it checks whether either $not(%albumsort%%album%) or that long combination of totaldiscs and totaltracks is true, which covers both the case of there not being any album tags and the album being a single track long.

$not(%albumsort%%album%)

This illustrates a handy trick for testing variables: $if and similar consider an empty value to be false and anything else to be true; the above is a compact way of saying "neither %albumsort% nor %album% contain anything. Be careful while using it, though, as I’ve seen some people on here run into issues with it counting whitespace (from putting the condition on a new line) as true even when the variable is empty – and I think the behaviour might even be different between the naming and the tagging scripts.

$or($not(%totaldiscs%),$lte(%totaldiscs%,1))

This might be able to be simplified to $lte(%totaldiscs%,1), but I’m not sure what the behaviour is if %totaldiscs% is empty, and the extra check isn’t going to hurt. Basically, this on its own doesn’t say anything and neither does %totaltracks% on its own (there might be a single-track bonus disc), but combining the two in an $and allows us to be sure that the entire release is just a single track.

Now that I’ve looked at the tags a bit more, if you only use MB releases, you’ll probably want to use %_totalalbumtracks% rather than the more complex condition, but I can see that easily going wrong for any albums that aren’t being hooked up. An $if2(%_totalalbumtracks%,%totaltracks%,1) might be best.

$if(%condition%,
	,
	$if2(%albumsort%,%album%)/
)

This is the full form of $if complete with the “else” clause. As normal, if the condition is true, the first option is chosen (here setting _savealbum to be empty) while if it’s false, it uses the first of $albumsort% and %album% to contain something ($if2 chooses the first non-empty value in the list) and adds another level of folders over those having no album – note that the path separator is included in the value of _savealbum.

$and($lte($matchedtracks(),3),$not($is_complete))
$gt($sub($if2(%_totalalbumtracks%,%totaltracks%,1),$matchedtracks()),3)
$not($is_complete())

Finally, the last thing you’ll want to add for your particular situation is a means to get rid of album fields for partial albums; any of the above will work in different manners. The first line will match albums that you only have three or less tracks for, as long as at least one track is missing, the second will match those where you’re missing at least three tracks – both of which can be tweaked by changing the 3 – and the final is a shortcut for if you want to match any album with any missing track. Choose the one that sounds the best to you, and add it to the test with the $unset calls.

Putting it all together, your script will probably look something like this:

$noop(I'd rather not save Picard's default album name to the tags)
$noop(Also, strip the album if it's missing tracks)
$if($or($not($is_complete()),$eq(%album%,[non-album tracks])),
	$unset(album)
	$unset(albumsort)
	$unset(discnumber)
	$unset(totaldiscs)
	$unset(tracknumber)
	$unset(totaltracks)
)
$noop(If neither album name is set, or if the album consists of a single track, put it in the artist's root)
$set(_savealbum,$if($or($not(%albumsort%%album%),$lte($if2(%_totalalbumtracks%,%totaltracks%,1),1)),
	,
	$if2(%albumsort%,%album%)/
))
4 Likes

Thank you for that i am going to play around with it.

Awsome explaination learned alot.

@WovenTales

Can you pls be so kind and have a look on my code in this thread:

As I see you are an expert in scripting & renaming.
Would be great if you can help me I think its not too much to do But I dont now how.