INTERACT FORUM

Please login or register.

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

Author Topic: Automated query (smartlists) to fix inconsistencies in music library  (Read 509 times)

chris13

  • Junior Woodchuck
  • **
  • Posts: 64

Hello forum,

i'm looking for a way to create query to show inconsistencies in my music library. Some queries are quite simple to realize, like size of the covert art (e.g. show cover art greater than 900x900). For some queries i would need your help:

1. show cover art, whose file size of the image file is greater than 512kb
2. show albums with missing folder.jpeg
3. show tracks where the capitalisation "upper case all words" is not applied
4. show tracks where filepath is not according to the rule [Album Artist (auto)]\[Year - Album]\if(IsEqual([Total Discs],1,5),Disc [disc #],)

I'm quite confident this could be done in JRiver, maybe via expression language? I would appreciate your help.
Logged

ferday

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 1732
Re: Automated query (smartlists) to fix inconsistencies in music library
« Reply #1 on: March 14, 2020, 05:53:31 am »

these are actually some difficult questions

1. image file size is not a database field, so you can't directly access it.  only [image height] and [image width] are accessible
2. ismissing([Filename (path)]\\folder.jpeg)
3. you can't search on capitalisation, but you can fix capitalisation with fixcase()
4. if(isequal([filename (path)],[[Album Artist (auto)]\[Year - Album],8),yes,no) - you can nest the ifs, but i would then use the answer to this logic to answer further logic...this is just
    a substring search

3 and 4 can probably be approached using Regex() but that is a complex subject

it would be of interest if someone knows how to access the image file size - when you look at it, the size appears but it seems to be resolved on looking at it, and not stored as a value

also remember that file paths, while they can be retrieved, are not an integral part of how MC works so it isn't optimised that way
Logged

chris13

  • Junior Woodchuck
  • **
  • Posts: 64
Re: Automated query (smartlists) to fix inconsistencies in music library
« Reply #2 on: March 14, 2020, 06:20:39 am »

Thanks for the reply!
I know i am struggling with the values which are not stored in any database field.

I will check the ismissing and fixcase() expressions - thanks for that!
Logged

marko

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 8954
Re: Automated query (smartlists) to fix inconsistencies in music library
« Reply #3 on: March 14, 2020, 07:18:29 am »

Hi ferday, chris13,

Honestly, for three and four, I would just select all and first do the "Clean" option from right click > Library Tools.... It will only change those that require it, then you know that everything is correct from then on, and then do the Rename, move and copy tool on the whole lot, using your file path rule, and again, it will only update those that require it.

For #2, careful with jpg vs jpeg. If you have "Tools > Option > File Location > Cover Art > Audio Mode" set to "In same folder as file as Folder.jpg" then again, select the lot, right click > cover art > save cover art to external location specified in options will write any missing Folder.jpg files

As far as I know, #1 can't be done. That "Swag of Tools" kit over in the 3rd party forum might be able to extract the info for you, but, if it can, that thing's way over my head so someone else would need to advise.

The substring search comparing filename path with library fields will work for the most part, but will fail for any cases where illegal characters have been replaced in the filepath with underscores...

-marko
Pages: [1]   Go Up