More > JRiver Media Center 27 for Windows

Custom fields - 'store 1 value per album' problem

<< < (4/5) > >>

zybex:
It means there's a second line of text, probably blank. Did you type a newline (Enter) after your expression?

zybex:
Zelda only shows a list of tracks, not albums, as the Expressions on MC also always work on a single track. So the track you select is the current context for any expression you execute.

You can just type [Album] on one line of the editor, and type your expression a couple of lines below it - then you can see on the 'Text Output' tab both the Album name and the result of your expression.

Alternatively, You can select the 'Playlist' tab and click the icon on the top-right corner to add columns to the view, like Album. In this tab, it shows the result of your expression for each track on the playlist you selected. To work in this mode it's best to write your expression on a single line of text of the editor.

One last tip: you can create a playlist in MC called 'Zelda testing' and drag your problematic tracks/albums into it. Then just select that list in Zelda to test expressions on it.

InflatableMouse:

--- Quote from: zybex on July 24, 2021, 07:36:10 am ---It means there's a second line of text, probably blank. Did you type a newline (Enter) after your expression?

--- End quote ---

Cool, that was it.

Thank you! I think I can work with this, I can hide the regular [Album] field replace it with [Album Title] in the regular views.

InflatableMouse:

--- Quote from: zybex on July 24, 2021, 07:41:33 am ---Zelda only shows a list of tracks, not albums, as the Expressions on MC also always work on a single track. So the track you select is the current context for any expression you execute.

You can just type [Album] on one line of the editor, and type your expression a couple of lines below it - then you can see on the 'Text Output' tab both the Album name and the result of your expression.

Alternatively, You can select the 'Playlist' tab and click the icon on the top-right corner to add columns to the view, like Album. In this tab, it shows the result of your expression for each track on the playlist you selected. To work in this mode it's best to write your expression on a single line of text of the editor.

One last tip: you can create a playlist in MC called 'Zelda testing' and drag your problematic tracks/albums into it. Then just select that list in Zelda to test expressions on it.

--- End quote ---

Awesome. Thanks again!

i'll leave some feedback in the zelda thread :P

haggis999:

--- Quote from: zybex on July 24, 2021, 06:42:28 am ---You have a typo in your regex - a missing escape for ']'. I also replaced ? with * at the end to catch multiple parenthesis groups:
Regex([Album], /#^(.+?)((\s*\[[^\]]*\])|(\s*\([^)]*\)))*$#/, 1)
Note that this is more or less the same as:
Trim(Regex([Album], /#([^(\[]*)#/,1))

--- End quote ---

I modified the [MyRegexTest] calculated field I created for the purpose of participating in this thread to use these revised regex expressions. Neither of them made any difference to the results I get. My album named Greatest Hits (2011 digital remaster) still generates a MyRegexTest value of Greatest Hits (2011 digital remaster) by Queen. I had expected a result of Greatest Hits, i.e. with the bracketed suffix removed and no reference to the artist. 

Have I misunderstood the purpose of these regex expressions?

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version