INTERACT FORUM

Please login or register.

Login with username, password and session length
Advanced search  
Pages: [1]   Go Down

Author Topic: Custom search instruction for files whose path do not contain the character + ?  (Read 1324 times)

8139david

  • Galactic Citizen
  • ****
  • Posts: 345

In my collection of albums, the filename (path) of an album sometimes contains the character +, and sometimes does not.
On any of my library views, I'd like to be able to run an easy custom search returning only those albums whose filename (path) doesn't contain the character +.
How can I do that?

NB: I have set up the user field plus (with search as aa):
IsEqual([filename (path)],+,8)
But I don't know what to do next.
Logged

Matt

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 41940
  • Shoes gone again!

I think you pretty much had it.  This smartlist shows files with a plus:
[=isequal([filename (path)],+,8)]=1
Logged
Matt Ashland, JRiver Media Center

8139david

  • Galactic Citizen
  • ****
  • Posts: 345

Thanks.
For greater simplicity, I've renamed the user field as 'a', defined as:
IsEqual([filename (path)],+,8)
And my custom search is:
[a]=0
All I need to do is to look for a recent search and identify this one. Good.

However, I don't know how the list of recent searches evolves. Eventually, this search may become not so recent.
So I have to remember the instruction:
[a]=0
Logged

8139david

  • Galactic Citizen
  • ****
  • Posts: 345

OK, I have in fact saved this custom search (as 'a').
So I just need to load it when needed.
Logged

8139david

  • Galactic Citizen
  • ****
  • Posts: 345

And all things considered, the following might be the best solution, considering that I will soon forget how the field 'a' is defined.
Type this custom search once:
[=isequal([filename (path)],+,8)]=0
Then save it with an homophonic name, namely: [=isequal([filename (path)],+,8)]=0
This way, I just need to load this particular search whenever I want, without pressures on my poor memory:)
Logged

8139david

  • Galactic Citizen
  • ****
  • Posts: 345

Is there a way for me to delete my recent custom searches (just keeping the saved ones)?
Logged

Matt

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 41940
  • Shoes gone again!

Is there a way for me to delete my recent custom searches (just keeping the saved ones)?

Coming in MC25 we'll have this:
NEW: Added the command "Delete Recent Searches" to the search control (if there are recents saved).
Logged
Matt Ashland, JRiver Media Center

8139david

  • Galactic Citizen
  • ****
  • Posts: 345

Great, thanks!

By the way, I have two further questions about custom search:
1) How can I conjoin two conditions, eg [a]=0 AND [c]=1?
2) How can I say that a field is empty? Eg [disc #] IS EMPTY?
Logged

blgentry

  • Regular Member
  • Citizen of the Universe
  • *****
  • Posts: 8009

If you are trying to audit your collection you might want to build a custom view to help you.  If you build a Panes view, you can make the first pane be a list of saved searches.  One of those saved searches can be the "no + in filename" search that you have talked about here.

You can build other searches that are interesting to you.  For example, how about a search that finds all files that do not have cover art assigned?  There are many others that might be useful for your collection.

Putting these all in one view lets you do several auditing tasks quickly, right from the same view.  Ask me how I know.  :) :D

Brian.
Logged

8139david

  • Galactic Citizen
  • ****
  • Posts: 345

Sure, I often do that.

But here, I would like to use the power of custom search (notably for on the fly selection of what I want to listen to), without building a custom library view.
Can I do 1) and 2) above?
Logged

RoderickGI

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 8186

1. I would like to know the most efficient way to do this as well. Brian?

I did it recently to set the [DSP] field using;
If(math( Isequal([Media Type], Audio, 1) & Isequal([File Type], flac, 1) ), HDPlayer, Player)

See context over here: https://yabb.jriver.com/interact/index.php/topic,118926.msg822852.html#msg822852

So you would use something like

math( Isequal([a], 0, 1) & Isequal(c, 1, 1) )

as a test condition. But there must be a better way. I couldn't get anything else to work though.

EDIT: Oh wait, this is just a Search isn't it, not using the Expression language, as in my example for tag on import. In that case, just the following will work;

[a]=0 [c]=1

But I'm pretty sure your original will work as well;

[a]=0 AND [c]=1

It's described under "Grouping and Combining" in this article: https://wiki.jriver.com/index.php/Search_Language



2. [Disc #]=[]

You can learn some of these things by setting up the condition in any "Set rules for file display" dialogue, and then clicking the "Import/Export" button. That will show the long form of the condition.

So "Disc #" "is" "" (a blank field) converts to [Disc #]=[]
Logged
What specific version of MC you are running:MC27.0.27 @ Oct 27, 2020 and updating regularly Jim!                        MC Release Notes: https://wiki.jriver.com/index.php/Release_Notes
What OS(s) and Version you are running:     Windows 10 Pro 64bit Version 2004 (OS Build 19041.572).
The JRMark score of the PC with an issue:    JRMark (version 26.0.52 64 bit): 3419
Important relevant info about your environment:     
  Using the HTPC as a MC Server & a Workstation as a MC Client plus some DLNA clients.
  Running JRiver for Android, JRemote2, Gizmo, & MO 4Media on a Sony Xperia XZ Premium Android 9.
  Playing video out to a Sony 65" TV connected via HDMI, playing digital audio out via motherboard sound card, PCIe TV tuner

MrBiff

  • World Citizen
  • ***
  • Posts: 143

Add a search keyword to your Filename (path) definition.

Call it

  fp=

then, in Search area, just type:

  fp=+

or

  -fp=+
Logged
Pages: [1]   Go Up