INTERACT FORUM

Please login or register.

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

Author Topic: Expressions as View Scheme Filter  (Read 1138 times)

bspachman

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 888
Expressions as View Scheme Filter
« on: March 07, 2007, 09:39:19 pm »

<plea>
I need some help with a new view scheme I'm creating...

In a nutshell, I'm trying to show all the files I have except for ones of a certain filetype. However, there are a couple of directories where I DO want those filetype shown. I can't seem to  pin this one down...

More concretely:
1) Show all filetypes except APE EXCEPT...
2) Show the APE files that are in a couple of directories.

Here's my example so far:

Code: [Select]
([=If(IsEqual([Filename (path)],"M:\pathname1"), -n=[], -Filetype=ape)] or
[=If(IsEqual([Filename (path)],"M:\pathname2"), -n=[], -Filetype=ape)])

However, this gives me no results...

I know the standard methodology for this is more like: [=<type your expression here>]=1, but I can't figure out how to phrase it.

Thanks,
brad
Logged

datdude

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 2215
Re: Expressions as View Scheme Filter
« Reply #1 on: March 07, 2007, 10:40:34 pm »

I don't know expressions very well, but I would make several smartlists breaking them up into the different categories you want and then include them in a playlist group and then have your view scheme display that playlist group as a pane.  That should do it.
Logged
"You are not a beautiful or unique snowflake." -  Just a very big snowball

marko

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 8967
Re: Expressions as View Scheme Filter
« Reply #2 on: March 08, 2007, 02:11:44 am »

The leverage available to you depends a lot on the actual path names themselves.

For example:
I keep my audio files in [file type] parents. So, i have things like D:\Music\ape\Bob Dylan\Hard Rain\ and D:\Music\flac\Bob Dylan\Street Legal\

The following rule when entered into Step 4 of the edit view scheme dialogue excludes all ape files except for a single Marc Cohn album that I know is in the \ape\ directory.
[media type]=audio -[=isequal([filename (path)],\ape,8)]=1 or [=isequal([filename (path)],marc,8)]=1

It says: Give me all audio, but exclude any files that have \ape in their path name, or, also show me files that have marc in the path name. I get all audio, excluding ape files, except for those marc cohn files.

The ,8 that follows the string to compare tells MC to make a case-insensitive, sub-string search, or in other words, the question you're asking is not "does the field equal this?", but rather "does the field contain this?"

Not knowing your exact directory structure, I can't offer a lot more help than that, but hopefully, there's enough there to get you rolling. This method would mean you would have absolutely no access to the excluded files in this view scheme, Datdudes suggestion would make them available under the "All" entry, with the option of filtering them out via selections made within the pane itself.

-marko.

bspachman

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 888
Re: Expressions as View Scheme Filter
« Reply #3 on: March 08, 2007, 08:38:34 am »

The leverage available to you depends a lot on the actual path names themselves.

<snip>

It says: Give me all audio, but exclude any files that have \ape in their path name, or, also show me files that have marc in the path name. I get all audio, excluding ape files, except for those marc cohn files.

<snip>

Not knowing your exact directory structure, I can't offer a lot more help than that, but hopefully, there's enough there to get you rolling. This method would mean you would have absolutely no access to the excluded files in this view scheme, Datdudes suggestion would make them available under the "All" entry, with the option of filtering them out via selections made within the pane itself.

Thanks to both of you. I'm really trying to obscure the files totally, so the 'Step 4 Method' is really more what I'm playing with.

Marko, I understand your expression perfectly, and it's very close to what I'm trying to do. However I run into the same problem your expression exhibits. I DO want to show those marc cohn ape files...

My directory structure is: M:\Others\[Album Artist (auto)\[Album]\

Each Album's folder contains all files related to that album: An APE file, the APLs, the CUE sheet, the Album Art, etc. etc. I don't want to display the APE files, except for a few directories where I haven't used the APE/APL method, but just have an APE for each track.

Maybe another way to attack this is to find an expression that says "if there are APLs in the folder, don't display APEs, but if there are, then display APEs"....?

brad
Logged
Pages: [1]   Go Up