INTERACT FORUM

Please login or register.

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

Author Topic: Expression to check for existence of a track in library  (Read 1297 times)

Cmagic

  • Regular Member
  • Citizen of the Universe
  • *****
  • Posts: 1196
  • Enjoying life with a little music....
Expression to check for existence of a track in library
« on: October 30, 2014, 08:08:58 am »

Hi Folks,

I am seeking for a way to automatically check if a given track already exists in my library.

When importing new tracks in my quite large library (BTW oldest import is Dec. 2002!), sometimes I find out that those tracks had already been imported few years ago. You know, I'm getting old, memory fades away! Yes, I know I should have been checking MC before ripping that old CD again.

I started with a smartlist to detect duplicates. I works but it's a manual, "post import" process, which is ok to clean an old messy library but not really for what I'm looking for.

So I tried expressions and came up with something pretty close to what I need. I used the ismissing() function to check for the existence of a file in my system. With a well organized naming strategy, it's quite easy to dynamically look for an already existing track with a given filename.
But this does not work if my main library disk (on a NAS) is offline -> Obviously ismissing() will do its job and report for an unexisting track when it is simply offline.

What I want is something that would do the same as ismissing() but only in the database not on the filesystem.
Something like a isinLib() or locate() function.

Is anybody aware of any way I can do that?
Thanks for any clue,

cheers,

Chris

 
Logged
Until the color of a man's skin is of no more significance
than the color of his eyes.
Bob Marley (War)

Matt

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 42053
  • Shoes gone again!
Re: Expression to check for existence of a track in library
« Reply #1 on: October 30, 2014, 09:49:35 am »

I can't think of a way to do this.

We could add a FileLookup(...) expression that took a filename and returned a database key.  I'm not sure...
Logged
Matt Ashland, JRiver Media Center

Cmagic

  • Regular Member
  • Citizen of the Universe
  • *****
  • Posts: 1196
  • Enjoying life with a little music....
Re: Expression to check for existence of a track in library
« Reply #2 on: October 30, 2014, 11:05:21 am »

Hey Matt,

Thanks for the feedback, it's not a big deal really. I was just having fun with MC.
Maybe the MC expression wizzard gang (MrC, Glynor and the rest..) will have some trick...

But you know what? the best thing is that you were the first to reply to my question, that really made my day!

All the best and more, Matt,

Cheers,

Christian
Logged
Until the color of a man's skin is of no more significance
than the color of his eyes.
Bob Marley (War)

Matt

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 42053
  • Shoes gone again!
Re: Expression to check for existence of a track in library
« Reply #3 on: October 30, 2014, 11:44:29 am »

Next build:
NEW: Added a FileLookup(...) expression that takes a filename and returns a database key.
Logged
Matt Ashland, JRiver Media Center

Cmagic

  • Regular Member
  • Citizen of the Universe
  • *****
  • Posts: 1196
  • Enjoying life with a little music....
Re: Expression to check for existence of a track in library
« Reply #4 on: October 30, 2014, 03:07:31 pm »

Cool! Thanks a lot Matt,

Best,

Christian
Logged
Until the color of a man's skin is of no more significance
than the color of his eyes.
Bob Marley (War)
Pages: [1]   Go Up