Soundtrack Folder Help

Tags: #<Tag:0x00007f2a59f86738> #<Tag:0x00007f2a59f860d0>

Is there a Tagger Script I can add for Soundtrack folder.
What I am trying to get is using my script:

$upper(%_extension%)/
$swapprefix($if2(%_artists_album_primary_std%,%artist%),The,Die,Le)/
$replace($replace($replace($replace($replace($replace($replace($replace($replace($replace($replace($replace($replace($swapprefix($if2(%albumartist%,%artist%),The,Die,Le), meets , & ), × , & ),; , & ), x , & ), | , & ), • , & ), ⋅ , & ), and , & ),+,&), with , & ), vs , & ), vs. , & )-$replace($truncate(%albumfolder%,100),:,-)
$if($gt(%totaldiscs%,1),-%totaldiscs%CD,)
$if($ne_all(%catalognumber%,none,[none]),$if(%catalognumber%,$upper(-($replace($replace($replace($replace($replace($replace($replace($replace($replace($replace($replace($rsearch(%catalognumber%,(.+?)(?:; |$)+),
,),⋅,),/,),:,),*,),?,),",),<,),>,),|,), ,)))))
$if($eq(%media%,LP),-VINYL],)
$if($eq(%media%,Vinyl),-VINYL,)
$if($eq(%media%,7" Vinyl),-7INCH VINYL,)
$if($eq(%media%,10" Vinyl),-10INCH VINYL,)
$if($eq(%media%,12" Vinyl),-12INCH VINYL,)
$if($eq(%media%,Cassette),-CASSETTE,)
$if($inmulti(%releasetype%,soundtrack),-OST,)
$if($inmulti(%releasetype%,ep),-EP,)
$if($inmulti(%releasetype%,single),-[Maxi-CD],)
$if($inmulti(%releasetype%,remix),-REMIX,)
$if($eq(%media%,SHM-CD),-[SHM-CD],)
$if($eq(%media%,Digital Media),-WEB,)
$if($eq(%media%,Blu-spec CD),-[BLU-SPEC],)
$if($eq(%releasestatus%,promotion),-PROMO,)
$if($eq(%releasestatus%,bootleg),-BOOTLEG,)
$if($gt(%_bits_per_sample%,16),-[%_bits_per_sample%bit-,)
$if($gt(%_sample_rate%,48000),$div(%sample_rate%,1000)kHz],)
-$if(%date%,$left(%date%,4)), ,
)-PiCARD
$set(_useMusicBrainzStyleForVinylTrack,1)
$set(VinylDetect0,)
$set(VinylDetect1,$if($in(%media%,Vinyl),$noop(
)$if($eq(%_useMusicBrainzStyleForVinylTrack%,1),$noop(
)$if(%_musicbrainz_tracknumber%,%_musicbrainz_tracknumber%. ))))
$set(_useSubDiscFolder,0)
$set(_mergeDiscWhenNotUsingSubfolder,1)
$set(_showDiscSubtitle,1)
$set(_useMusicBrainzStyleForVinylTrack,1)
/$if($in(%media%,Vinyl),
$noop(
)$if($eq(%_useMusicBrainzStyleForVinylTrack%,1),
$noop(
)$if(%_musicbrainz_tracknumber%,%_musicbrainz_tracknumber%. )
$noop(
)),$noop()
$set(_useMusicBrainzStyleForVinylTrack,1)
$set(VinylDetect0,)
$set(VinylDetect1,$if($in(%media%,Vinyl),$noop(
)$if($eq(%_useMusicBrainzStyleForVinylTrack%,1),$noop(
)$if(%_musicbrainz_tracknumber%,%_musicbrainz_tracknumber%. ))))
$set(_useSubDiscFolder,0)
$set(_mergeDiscWhenNotUsingSubfolder,1)
$set(_showDiscSubtitle,1)
$set(_useMusicBrainzStyleForVinylTrack,1)
/$if($in(%media%,Vinyl),
$noop(
)$if($eq(%_useMusicBrainzStyleForVinylTrack%,1),
$noop(
)$if(%_musicbrainz_tracknumber%,%_musicbrainz_tracknumber%. )
$noop(
)),$noop()
$if(%tracknumber%,$if($gt(%totaldiscs%,1),$if($and($eq(%_useSubDiscFolder%,0),$eq(%mergeDiscWhenNotUsingSubfolder%,1)),%discnumber%))$num(%tracknumber%,2).)
)$replace(-%artist%-%title%, ,
))

Any soundtrack is going to a folder named after either various artists or actual artist name. I would love only Soundtracks to go to a Soundtrack folder with no artist prefix just the movie soundtrack. Example

Soundtracks/Transformers-_Age_of_Extinction-_The_Score-(LLLCD1311)-OST-2014

You can take a look at my script here:

I just use: $if($in(%releasetype%,soundtrack), at the beginning to separate the soundtracks out.

Thanks, @Billy_Yank I got that part to work, I just want to eliminate the Artist name before the album now, I don’t need it to say Various Artists in the folder for Soundtracks I just want the folder to start with the Movie Name.

It sounds like you’ve got a reference to %albumartist% in there. If you remove that, it should get rid of that.

@Billy_Yank OK I’m still with you, but if I remove %albumartist% won’t that remove the artists for all album folders? I just want to remove it for Soundtracks?

That would depend on how you structure your if statement.

Something like:

$if($in(%releasetype%,soundtrack),Soundtrack/,%albumartist%/) 

That’s probably a good place to start.

In my script I repeat my naming script in each of the three different stages of my if-else-else statement, but that’s really inefficient. Looking at a more modular design, like @FragaGeddon’s, I’ve now got some ideas on how to tighten up my script. I just haven’t buckled down and done it.

2 Likes

I would try with Soundtrack plugin (“Sets the albumartist to “Soundtrack” if releasetype is a soundtrack.”)
and then try to get rid of Soundtrack from albumartist. Maybe with something like this??

$if($inmulti(%releasetype%,soundtrack)$ne(%albumartist%,))

I do not know if it will work (propably not). Someone who is more proficient than me would have to help you.

Thanks for the effort but not working I will have to research and play with this one.

@Billy_Yank Your script all together works at taking out the Artists name from the folder on Soundtracks but I do not understand what line in your script is doing it?

It’s not that I remove it, it’s that I never add it in.

$if($in(%releasetype%,soundtrack),
	$noop(Soundtracks)
	Soundtrack/~
	$left($swapprefix(%album%,A,An,The),1)~/$swapprefix(%album%,A,An,The)
	$if(%_releasecomment%, \(%_releasecomment%\),$noop())
	$if($in(%releasetype%,single), \(Single\),$noop())
	$if($in(%releasetype%,ep), \(EP\),$noop())/
	$if($gt(%totaldiscs%,1),%discnumber%,$noop())
	$if($gt(%_totalalbumtracks%,99),$num(%tracknumber%,3),$num(%tracknumber%,2)) - %artist% - %title%,

Notice that album artist isn’t in there.

In the part of my script that handles “normal” albums, you can see the album artist sort name right there at the beginning of that horribly over engineered if2 statement:

		~$left($if2(%albumartistsort%,%artistsort%,%albumartist%,%artist%),1)~/
		$if2(%albumartistsort%,%artistsort%,%albumartist%,%artist%)/%album%
		$if(%_releasecomment%, \(%_releasecomment%\),$noop())
		$if($in(%releasetype%,single), \(Single\),$noop())
		$if($in(%releasetype%,ep), \(EP\),$noop())/
		$if($gt(%totaldiscs%,1),%discnumber%,$noop())
		$if($gt(%_totalalbumtracks%,99),$num(%tracknumber%,3),$num(%tracknumber%,2)) - %artist% - %title%)

Now, as I said before, this is a real inefficient way to write this script. The last 5 lines in both these script blocks are the same. So a more efficient way to write this is (with the if2 statements removed for clarity):

$if($in(%releasetype%,soundtrack),
	$noop(Soundtracks)
	Soundtrack/~
	$left($swapprefix(%album%,A,An,The),1)~/$swapprefix(%album%,A,An,The),
		$noop(Normal albums)
		~$left(%albumartistsort%,1)~/%albumartistsort%/%album%)
$noop(Common script elements)
$if(%_releasecomment%, \(%_releasecomment%\),$noop())
$if($in(%releasetype%,single), \(Single\),$noop())
$if($in(%releasetype%,ep), \(EP\),$noop())/
$if($gt(%totaldiscs%,1),%discnumber%,$noop())
$if($gt(%_totalalbumtracks%,99),$num(%tracknumber%,3),$num(%tracknumber%,2)) - %artist% - %title%

Now the if statement only contains those elements that need to change.

1 Like

Ahhhhh I see what you did there, Thanks for the explanation :wink:
I just wonder if there was some kind of line I could write like $if in Soundtrack remove albumartist but only for the folder part not the files… Seems to me it should really be that simple but I am just hacking my way through this scripting language and sometimes actually getting lucky and things work.