More > JRiver Media Center 29 for Windows

expression help please

<< < (3/4) > >>

zybex:
Have you tried the first expression (without any folder filter)? It should work, unless you have more collections that you want to keep out of the results.

You need both the ~nodup and the ~dup as I pasted on the previous post, and their order is important.
You can just use the folder names directly - just paste this into the Search box:

--- Code: ---([Filename (path)]="E:\$Media\Music\" or [Filename (path)]="E:\$Media\Music (culls)\") ~nodup=[Artist],[Filename (path)] ~dup=[Artist] ~sort=[Artist],[Filename (path)]
--- End code ---

comox:
Thanks for your help. Yes I did try it.

It returns 1 file for every album by every artist from both collections, which is not helpful.

I want 1 file by every artist from both collections.

I think this is understandable since my tracks are named:
E:\$Media\Music\[Artist] - [Year] - [Album]\[Track #] - [Name]
E:\$Media\Music (culls)\[Artist] - [Year] - [Album]\[Track #] - [Name]

That's why I'm trying to get the extract function to work.

As a simple test to figure out what's going on I tried:

~nodup=Extract(6, [Filename (path)], E:\$Media\, \)

I expected 1 file from each collection. Instead it returns zero files.

Any tips on getting Extract to work?




zybex:
You said "I have some music albums accurately tagged with [Artist] & [Album]". I'm assuming you mean the [Artist] field is accurate for all tracks, regardless of what the folder name is called. If you're trying to search based on the actual folder names then it's a whole different expression.


--- Quote ---It returns 1 file for every album by every artist from both collections, which is not helpful.
--- End quote ---
Where are you putting the expression? This is not to be used as an "expression column', it's a filter to enter in the Search Omnibox (top right corner), or to Import into a Smartlist. It does not return any value, it just filters the View.

The expression as I gave you does return one file per [Artist] from each folder, for all artists that exist in both folders (artists present in just one folder are filtered out). Check the screenshot below.
If you instead want per [Album Artist], just change the expression accordingly. And again, note that this only works if your fields in MC are properly tagged.


--- Quote ---As a simple test to figure out what's going on I tried:

~nodup=Extract(6, [Filename (path)], E:\$Media\, \)
--- End quote ---
This is not a valid Search Expression, and also not a valid Expression for a field/column. You can't mix Search modifiers like ~nodup with an Expression function like that. You can use functions in the search box, but not with that syntax and probably not to accomplish what you want.

comox:
Yes, [Artist] is accurately filled for all tracks.

I am putting the expression in the search omnibox of a view that shows all of my music tracks.


--- Quote from: zybex on March 16, 2022, 11:50:35 am ---The expression as I gave you does return one file per [Artist] from each folder, for all artists that exist in both folders (artists present in just one folder are filtered out). Check the screenshot below.
--- End quote ---

I agree, the problem I think is that every album has a unique [filename (path)] (see above for how albums and tracks are named) and so I get one file for every album rather than one file for every artist. That's why I was trying to extract the relevant substring from the path.

Reading the documentation on the Search Language and Functions I see no mention that functions cannot be used with the Search Language.

I'm out of ideas if I cannot use Functions.

Not the end of the world. I'll do the work manually. Thanks for your help.

zybex:
Perhaps I misunderstood your request. The filter above shows one file per folder if there's another file in a different folder with the same Artist (any pair of folders). It sounds like you want to intersect the list of Artists in your "Music" collection with the list of Artists from the "Music (culls)" collection, but without considering duplicate artists within the same collection/tree, which is not exactly the same thing.

This is still possible. Just create a Calculated field called "Collection" with the following expression:

--- Code: ---if(isEqual([filename], /(culls/)\, 8), Culls, Music)
--- End code ---

Then use this filter:

--- Code: ---~nodup=[Artist],[Collection] ~dup=[Artist] ~sort=[Artist],[Collection]
--- End code ---

This will only show pairs of files with the same Artist where one of them is in the Culls collection and the other is not.

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version