INTERACT FORUM

Please login or register.

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

Author Topic: Smartlist help please!  (Read 308 times)

GaryB

  • World Citizen
  • ***
  • Posts: 123
Smartlist help please!
« on: January 11, 2025, 08:54:01 am »

I have tried to write a smartlist that will scan a folder of of audio files to determine if an individual file is in the correct file path.
The filepath is \\Storage\Music\m4a\Artist\Album\

I was hoping that using the variable [Album] in the "Filename path ---does not contain-- [Album]  would only show me the entries where the the name of the album is "Sky" and the filename path is \\Storage\Music\m4a\Artist\Sea\ ?



Logged

zybex

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 2723
Re: Smartlist help please!
« Reply #1 on: January 11, 2025, 03:53:01 pm »

the search language uses the square brackets as anchors, so "[Album]" actually means "match a string that starts and ends with "Album" - so it's matching the exact string "Album" instead of the [Album] field.

You want something like this - paste it in the "Import/Export" button of the playlist editor:
[=listContains([Filename (path)],[Album])]=0
 
Logged

GaryB

  • World Citizen
  • ***
  • Posts: 123
Re: Smartlist help please!
« Reply #2 on: January 12, 2025, 12:24:22 pm »

the search language uses the square brackets as anchors, so "[Album]" actually means "match a string that starts and ends with "Album" - so it's matching the exact string "Album" instead of the [Album] field.

You want something like this - paste it in the "Import/Export" button of the playlist editor:
[=listContains([Filename (path)],[Album])]=0

Thank you Ever So Much !!

I must have spent a couple of hours looking through posts on the forum !!

I have obviously got confused by [Album] being a variable in the renaming function. Is there a post or an article that you can point me in to read more?

Gary
Logged

zybex

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 2723
Re: Smartlist help please!
« Reply #3 on: January 12, 2025, 04:05:21 pm »

Smartlists are basically "search expressions", using the same syntax as the Search bar in MC. Here's the documentation:
https://wiki.jriver.com/index.php/Search_Language

As mentioned in that page, a Search query can include Expression Language code:
https://wiki.jriver.com/index.php/Search_Language#Searching_with_Expressions

Here's the Expression Language Wiki:
https://wiki.jriver.com/index.php/Expression_Language
Logged
Pages: [1]   Go Up