Album Title Tagging

I like to append info to an album title that better reveals it’s source. For example, vinyl rips are appended “(LP Rip)”.

This is the script I wrote:

$if($eq(%media%,12" Vinyl),$set(album,%album% \(LP Rip\)))

But for track 1 on the album “The Story of a Young Heart” the album title becomes:

The Story of a Young Heart (LP Rip) (LP Rip) (LP Rip) (LP Rip) (LP Rip) (LP Rip) (LP Rip) (LP Rip) (LP Rip) (LP Rip) (LP Rip) (LP Rip) (LP Rip) (LP Rip) (LP Rip) (LP Rip) (LP Rip) (LP Rip) (LP Rip) (LP Rip) (LP Rip) (LP Rip) (LP Rip) (LP Rip) (LP Rip) (LP Rip) (LP Rip) (LP Rip) (LP Rip) (LP Rip) (LP Rip) (LP Rip) (LP Rip) (LP Rip) (LP Rip) (LP Rip) (LP Rip) (LP Rip) (LP Rip) (LP Rip) (LP Rip) (LP Rip) (LP Rip) (LP Rip) (LP Rip) (LP Rip) (LP Rip) (LP Rip) (LP Rip) (LP Rip)

…and the last track (9) shows:

The Story of a Young Heart (LP Rip) (LP Rip) (LP Rip) (LP Rip) (LP Rip) (LP Rip) (LP Rip) (LP Rip) (LP Rip) (LP Rip) (LP Rip) (LP Rip) (LP Rip) (LP Rip) (LP Rip) (LP Rip) (LP Rip) (LP Rip)

Oddly, the number of “(LP Rip)” instances decreases with increasing track number.

I also tried:

$set(album,%album%$if($eq(%media%,12" Vinyl), \(LP Rip\)))

It gave the same result. But that script is identical to:

$set(album,%album%$if(%_releasecomment%, \(%_releasecomment%\)))

…which behaves as expected.

What am I doing wrong?

Thanks!

1 Like

The problem is that you’re changing the album title (appending the “(LP Rip)” portion) every time the script executes. See the Tagging Scripts section of the documentation for more information regarding when the scripts are executed.

I haven’t tested this, but I think you might be able to achieve what you want by expanding your test to only add the additional information if it does not already exist, as:

$set(_album_extra, \(LP Rip\))
$if($and($eq(%media%,12" Vinyl),$not($in(%album%,%_album_extra%))),$set(album,%album%%_album_extra%))
2 Likes

It’s still odd and unexpected, a script like this is supposed to work for loading on a release. Just like the other example using %_releasecomment%. Need to check what’s so special when using %media%, but currently I would consider this a bug.

1 Like

The only thing I can think of is that there was something that was triggering the script to be re-run, although I’m not sure what it would be (other than it will run once for each track processed). Also, when the album tag is updated, is the update applied to just the metadata for the track being processed by the script, or is it updated for all tracks? Either way, I agree that it’s unusual and unexpected behavior.

1 Like

I dug into it today by simplifying. I changed the file naming script to a simple preset, disabled all my autorun scripts, and focused on the album title. Changed $eq(%media%,12" Vinyl) to $find(%media%,Vinyl). I tried creating a new hidden variable if one of the above was true. Nothing worked.

Lastly, I just tried to get it to simply rename the album unconditionally:

$set(album,%album% \(LP Rip\))

When I ran it like that, the app crashed without notice. (Win10 x64)

I restarted it, reloaded the same album, and the simple script ran just fine. I tried the conditional script, and it worked fine as well. I went back to my file naming system, and added all my scripts back one by one refreshing the album each time. There were no issues.

I’m now back to my more complex original album naming script:

$if($or($ne(%date%,%yearreleased%),%_releasecomment%,$find(%media%,Vinyl)),$set(album,%album% \($if($ne(%date%,%yearreleased%),%yearreleased% Re,)$if(%_releasecomment%,%_releasecomment%)$if($find(%media%,Vinyl),$if($ne(%releasecountry%,US),%releasecountry%)LP Rip)\)))

…and everything is still good. I’m using $find now instead of $eq, bujt that’s the only difference.

So the issue was transient. If it happens again, I’ll try to spot the trigger. At least now I know to just restart the app.

Thanks for all the replies!

Sadly, the problem returned immediately. The album above looked perfectly tagged, but before saving it, I opened the file naming script to confirm it was okay. Unfortunately, all the filenames had multiple instances of “(LP Rip)” as before. I closed the editor, and saw that the tags had become corrupt as well. They were not corrupt before I opened the editor.

I then disabled my custom file naming script, restarted the app, reloaded the album, and looked at the simple file naming presets. They were all corrupted as above.

I disabled the Album Title script, restarted, and all was okay. I created a new simple album title script that simply appended “TEST” to the album name. I restarted, reloaded, and all the file naming was corrupt again with multiple “TEST” instances per file. The tag was getting corrupted, too.

I’m saving these files to my media server. It’s a mapped drive so I simply had the drive letter and music folder for my saving location. I changed this to ip address<folder> and that didn’t help.

Any ideas?

Edit: BTW, I tried version 2.7.3, but went back to 2.7.1 because of an issue. It was months ago, so I don’t recall the issue - but it may have been this.

Did you try the script that I provided in my earlier response? Because of the additional check, it should only add the additional information to the title once.

I’ve tried it now and it seems to work. I didn’t pursue it before because of the bug discussion. This was just a simple test, and I need to bring back my file naming script and the others.

I presume it’s still a bug, tho, since the documented $_releasecomment% example would do the same thing - at least with my setup.

Do I need to submit it?

Please do, including as much information as possible so we can try to reproduce it. That will make finding and fixing much easier. Thanks.