%aunique usage


#1

I have 2 files, one is the edit version and the other is the pro-mix

The source looks like this:
01_da_tweekaz_ft.haliene-bring_me_to_life(edit)
02_da_tweekaz_ft.haliene-bring_me_to_life(pro_mix)

the discogs lookup, only has one entry, neither of which is edit or pro edit: https://www.discogs.com/Da-Tweekaz-Ft-Haliene-Bring-Me-To-Life/release/11984523

Is there any way with %aunique to keep the edit/pro-mix portion of the file name when tagging and moving the file? If not, I suppose I can stick with the empty %aunique{} and the randomly generated number, but thought I would ask before I did. Thanks.


#2

Hmm… this would be possible if the information could be fetched from Discogs (but it sounds like it’s not). An alternative would be for you to manually set a field (you could call it $version) using the modify command:

beet modify bring me to life version=edit

and then include $version somewhere in your path format (perhaps using %aunique).

The other relevant thing here is that %aunique is only for disambiguating identically-named albums, not tracks. For that, you might consider just doing something like %ifdef{version,($version)} or something to include that field whenever it’s defined.


#3

this is great. makes sense.

The question I would have then is about avoiding the aunique in the event version exists.

In theory, having the album folder “bring me to life” and then in it my 2 files defined using the %ifdef you mention.

At that point, I do not need to have 2 separate album folders because aunique. Having both files custom named in one folder is enough.


#4

This actually works perfectly.

Added the version tag, re-import use-as is and merge on import.

Files are then tagged appropriately, named so you can tell them apart and in the same folder.