Skip to main content
Topic: Omitting colons, semi-colons and the like (Read 2001 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Omitting colons, semi-colons and the like

So I make use of %discnumber%: for multi-disc sets. In some cases I've needed to account for subtitles/etc. (not sure of the proper term) so I took to using %discsubtitle%: (value) and in the cases of bonus discs %bonusdisctitle%: (value) keeping in mind to account for whether the fields are present or not. Unfortunately, for the all the thought put in I seem to have neglected the eventuality that a field would be used while the other two would be left out (or a combination of the two, leaving a third out - hard to explain coherently).

Essentially leaving me with:

<album> (%discsubtitle%:)

or similar (hopefully that makes sense - mainly where it leaves a hanging colon when one of the remaining fields is not present).

What I'm using currently (grouping and move patterns) -

Code: [Select]
[%album artist%[ - $year(%date%)] - %album%[ '('[Disc %discnumber%':' ][%discsubtitle%':' ][%bonusdisctitle%]')']]


and

Code: [Select]
%album artist% - %album% '('$year(%date%)')' '['[$if($stricmp(%codec_profile%,CBR),%bitrate%,) ]%codec%[ %codec_profile%]']'\[Disc %discnumber%[ - %discsubtitle%][ - %bonusdisctitle%]]\]%tracknumber% - %title%[ '('%version%')']


I considered bypassing it entirely and just using a series of individual parentheses per field and making sure to add the discard next to each when not present but something about that seemed like it'd make for a needless mess in terms of organization (personally, that is).

It's more likely I'm overlooking something obvious (or my scripts are poor - likely both) so any help in pointing out what it is would be appreciated.

Omitting colons, semi-colons and the like

Reply #1
Use the $and and $or functions for if statements:
Code: [Select]
$if($and(%discnumber%,$or(%discsubtitle%,%bonusdisctitle%)),': ')
&
Code: [Select]
$if($and(%discsubtitle%,%bonusdisctitle%),': ')


Omitting colons, semi-colons and the like

Reply #2
Thanks.

I'm no good at $if statements, so I modified the grouping pattern like this -

Code: [Select]
[%album artist%[ - $year(%date%)] - %album%[ '('$if($and(%discnumber%,$or(%discsubtitle%,%bonusdisctitle%)),': ')]]


Which killed the separation of discs (now in a multi-disc set they all just group together under one main header).

I'd like to keep them grouped apart (ex. Album (Disc 1), Album (Disc 2: subtitle)), if any fields are present.




Omitting colons, semi-colons and the like

Reply #3
Ah no, I should have been a bit clearer sorry.

The if statement I gave only controls the visibility of the colon, so you would use it like so:
Code: [Select]
[%album artist%[ - $year(%date%)] - %album%[ '('[Disc %discnumber%]$if($and(%discnumber%,$or(%discsubtitle%,%bonusdisctitle%)),': ')[%discsubtitle%]$if($and(%discsubtitle%,%bonusdisctitle%),': ')[%bonusdisctitle%]')']]

Omitting colons, semi-colons and the like

Reply #4
Thanks, this worked for the grouping but following the layout you gave for the move preset I listed in my opening post seems to output the directory in an odd way. Likely my fault again no doubt as I replaced parts of the move preset like so -

Code: [Select]
%album artist%\%album% '['[$if($stricmp(%codec_profile%,CBR),%bitrate%,) ]%codec%[ %codec_profile%]']'\[Disc %discnumber%]$if($and(%discnumber%,$or(%discsubtitle%,%bonusdisctitle%)),': ')[ - %discsubtitle%]$if($and(%discsubtitle%,%bonusdisctitle%),': ')[ - %bonusdisctitle%]]\]%tracknumber%[ - %track artist%] - %title%[ '('%version%')']




Omitting colons, semi-colons and the like

Reply #6
it's one of the built in colour schemes for default UI. view>layout>quick setup>colors.

Omitting colons, semi-colons and the like

Reply #7
Thanks, this worked for the grouping but following the layout you gave for the move preset I listed in my opening post seems to output the directory in an odd way. Likely my fault again no doubt as I replaced parts of the move preset like so -

I take it you are seeing "_ - " when you only want a dash. Just replace the colon and space between the single quotes (': ') with the separator you want, in this case I'm guessing space-dash-space(' - '). Then remove the spaces and dash in the square brackets ([]) and it should do what I think you want it to.

Re: Omitting colons, semi-colons and the like

Reply #8
Very sorry for resurrecting this old thread, but how do you add subtitles to cue sheets?

I've tried different forms of 'DISCSUBTITLE' but I can't get it to work.  Thanks!

 
SimplePortal 1.0.0 RC1 © 2008-2020