INTERACT FORUM

Please login or register.

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

Author Topic: Help setting Library, using Expressions  (Read 2851 times)

cochinada

  • World Citizen
  • ***
  • Posts: 225
Help setting Library, using Expressions
« on: February 26, 2023, 12:36:00 pm »

Hello guys,

Long story short, I'm one of many affected by the Theater View blank or white with Ubuntu 22.04.2 LTS.
In the process of restauration, I ended up downgrading to Ubuntu 20.04.5 LTS but screwed up and lost my Library backups so I had to start from scratch.

Following many suggestions I got Years ago on this Forum, telling that I should not use File location but Tags instead, I think is now the time to try to implement such thing.

I just need guidance for one View and from that I think I can manage to create the others. It is just that I don't get how to use Expressions with all these fields, functions and variables and feel completely lost. I tried many variants to no success so I decided once more to resort to the knowledge of you people here.

I'll try to keep this as clear as possible.
My goal is to create a "Classical" view for displaying all my Classical albums.

My files are stored like this:

Top level is divided into 4 groups:
A-D, E-M, N-Z, (Various Composers).
2nd level has all the composers belonging to the 1st groups chosen, with the exception of '(Various Composers)' which has only the name of the Albums.
3rd level has of course the Albums and is the equivalent to the 2nd level for '(Various Composers)'.

That being said I would like to navigate the same way.
I would like to show first the 4 groups and then be able to drill down.

Unfortunately I can't even get the Top level right! This is what I get with these settings:


Notice the presence of "Classica", "Multimedia" and "Musica" mixed with the groups "A-D", "E-M" and "N-Z". Also, '(Various Composers)' is missing!
I tried many different expressions, like using FileFolder(,3) or 2 or 5, 6, etc. I tried even to use more complex Expressions but clearly I don't have a clue what I'm doing. :(

As for the Thumbnails Text, this is what I get with this Expression:


Nada. Niente! Zilch! Rien! Nothing!

BTW, I'm receptive to alternatives, like using custom Library fields. In fact I have already two: 'Music Type' and 'File Location'. This last one is just not filled for Classical music but I can do it. Is it more efficient this way instead of using expressions?
The thing with custom fields is that I don't know how to setup MC to automatically fill them when importing new files but I know this can be done...
Logged

JimH

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 72396
  • Where did I put my teeth?
Re: Help setting Library, using Expressions
« Reply #1 on: February 26, 2023, 02:53:48 pm »

Logged

cochinada

  • World Citizen
  • ***
  • Posts: 225
Re: Help setting Library, using Expressions
« Reply #2 on: March 01, 2023, 05:13:46 am »

Did you find this topic on the wiki?
https://wiki.jriver.com/index.php/Tagging_Classical_Music

Thanks.
I'm just about finishing reading it all which is not easy as it is a lot of information because it also refers other links inside. I particularly liked the article "The Zen of Classical Music Tagging" that was indirectly mentioned inside one of those main links. I'm also reading the Wiki for more basic understanding, namely about functions and what not.

The main lesson I take from all I read so far is that there are many ways to skin a cat, and to each, its own. That I knew already but it's always nice to learn about different methods used by different people for inspiration.

I'll quote this magnificent passage:
The most important thing to understand is that you have to have a structured naming system for your classical music, and you have to enforce it.  If you want your information to be automatically parsed out, it has to be systematized. That is essential.

In this last weekend I did some housekeeping but only for the "Composer" tag as I had and probably still do, many inconsistencies, result of so many ways that so many data bases use to populate the data, and some caused by human error as well (mine).
So, I'm trying to get my database structured and consistent and begun with Composer. As for the rest, I'm still pondering what custom tags (if any) to create or not.
I also read someone who said he didn't use custom tags at all but would rather rely on the MC Library alone. I'm not quite sure what this means and/or implies but I guess it requires a lot of Expressions to be used everywhere. As I'm not an expert on that topic I'll probably create custom tags whenever it makes sense trying not to overkill.

One very basic doubt I still have, for which haven't found an answer yet, is if it's possible for MC to be clever enough to give as the final result the CD wherever whatever we research belongs to. This sounds a bit awkward but I'll show you what I mean taking this CD as an example:

Brahms: Piano Concerto No. 2 / Mozart: Piano Concerto No. 27

Now, if I can develop some cleaver method for showing me all interpretations I have of let's say Mozart: Piano Concerto No. 27, (e.g. a pane view or equivalent) I'm sure the result will show more albums than just this one.

The problem is that ultimately, when I pick the interpretation I want to listen, I don't want to listen to just this piece or composition "Mozart: Piano Concerto No. 2" but to the whole CD where this particular version is, or at least be given the opportunity to do it! For that to happen, MC has to be clever enough to present me that Album as my final click of the mouse.

BTW, I'm still talking about Standard View, because regrettably my Theater View is still not working as I reported elsewhere but ultimately the goal will be to use this view exclusively.

Suppose
Logged

lepa

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 2033
Re: Help setting Library, using Expressions
« Reply #3 on: March 01, 2023, 08:52:49 am »

FileFolder(,6) as grouping should work to get you started
Logged

cochinada

  • World Citizen
  • ***
  • Posts: 225
Re: Help setting Library, using Expressions
« Reply #4 on: March 01, 2023, 10:46:30 am »

FileFolder(,6) as grouping should work to get you started

It doesn't work.
As I wrote, "I tried many different expressions, like using FileFolder(,3) or 2 or 5, 6, etc. "



...and if I expand on the left tree to see what the heck this is...


I guess this Filefolder function doesn't work on Linux.
Logged

lepa

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 2033
Re: Help setting Library, using Expressions
« Reply #5 on: March 01, 2023, 11:50:48 am »

It should work (FileFolder(,6) I mean) and I think that there is a bug in Linux FileFolder() function. Booted up my old laptop with Ubuntu 22.04 and folde tree seems to be handled backwards in Linux. Probably something to do with windows/linux back slash vs forward flash.

Also Windows version gives somewhat strange results while giving mostly the correct ones

FileFolder works from right to left so if your folder structure doesn't have same amount of folders coming from right to left then you cannot use that function
Logged

lepa

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 2033
Re: Help setting Library, using Expressions
« Reply #6 on: March 01, 2023, 01:49:32 pm »

If you really especially want to use that folder structure as your grouping you could try following expression to group AND to display (to get thumbnail to show correct value)
Mid([Filename (path)],42,Math(Find([Filename (path)],//,42) - 42))

If i looked your folders correctly it will get text which starts from character index 42 and continues printing until next "/". I'm sure there are more clever ways to achieve this but something like that should work.

You could also consider to use the actual metadata of the files to do the same using real fields like composer or artist to do the grouping
Logged

cochinada

  • World Citizen
  • ***
  • Posts: 225
Re: Help setting Library, using Expressions
« Reply #7 on: March 01, 2023, 03:09:43 pm »

I don't know why but still doesn't work.

Logged

lepa

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 2033
Re: Help setting Library, using Expressions
« Reply #8 on: March 01, 2023, 03:17:28 pm »

Pictures are little unclear to see but it should with space [Filename (path)] not [Filename(path)]
Logged

cochinada

  • World Citizen
  • ***
  • Posts: 225
Re: Help setting Library, using Expressions
« Reply #9 on: March 01, 2023, 03:28:55 pm »

Pictures are little unclear to see but it should with space [Filename (path)] not [Filename(path)]

OK, I'll try but isn't Filename a function and if so, does it matter if there is a space before the '('?

Clearly it matters but I don't understand why.  ::)

Logged

lepa

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 2033
Re: Help setting Library, using Expressions
« Reply #10 on: March 01, 2023, 03:36:15 pm »

It's a field not a function. that's why
Logged

cochinada

  • World Citizen
  • ***
  • Posts: 225
Re: Help setting Library, using Expressions
« Reply #11 on: March 01, 2023, 03:40:33 pm »

It's a field not a function. that's why

This is very tricky. If Filename is a field then what is path and what does it mean this sequence?
Filename (path)
Logged

lepa

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 2033
Re: Help setting Library, using Expressions
« Reply #12 on: March 02, 2023, 01:51:13 am »

You can see yourself from action window's tag panel.
[Filename] = whole filename path including actual name of the file
[Filename (path)] = directory path to that file
[Filename (name)] = just the name of the file without directory path

for the expression you can study the parameters against wiki documentation:
https://wiki.jriver.com/index.php/String_Manipulation_Functions#Find
https://wiki.jriver.com/index.php/String_Manipulation_Functions#Mid
Logged

cochinada

  • World Citizen
  • ***
  • Posts: 225
Re: Help setting Library, using Expressions
« Reply #13 on: March 02, 2023, 05:17:48 am »

You can see yourself from action window's tag panel.
[Filename] = whole filename path including actual name of the file
[Filename (path)] = directory path to that file
[Filename (name)] = just the name of the file without directory path

for the expression you can study the parameters against wiki documentation:
https://wiki.jriver.com/index.php/String_Manipulation_Functions#Find
https://wiki.jriver.com/index.php/String_Manipulation_Functions#Mid

Thank you very much!
I was searching through the Wiki and the forums with no success.
Logged

cochinada

  • World Citizen
  • ***
  • Posts: 225
Re: Help setting Library, using Expressions
« Reply #14 on: March 02, 2023, 12:21:58 pm »

I cannot figure how to distinguish between multiple CD albums and single CD albums.

Take this example of my Prokofiev Albums.
The 1st one is a single CD and the 2nd a double CD.
The double CD is fine but for the single CD I cannot get rid of a redundant level as you can see below.

NOTEs:
the double CDs have Disc # but the single ones have this field empty.
I've changed the last Expression like putting [Name] or even nothing instead of [Album] but I always get a redundant level after I click over the 1st album and nothing should open because I'm already seeing the tracks on the pane below. Instead, it opens this last level "October Cantata, etc Ex..." which is, you guessed it!, the [Album]... again









Please help.  :)
Logged

lepa

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 2033
Re: Help setting Library, using Expressions
« Reply #15 on: March 03, 2023, 06:49:39 am »

In standard view I think this is how it works. So if you set grouping then there is grouping and MC doesn't auto populate files
Logged

cochinada

  • World Citizen
  • ***
  • Posts: 225
Re: Help setting Library, using Expressions
« Reply #16 on: March 03, 2023, 09:44:30 am »

In standard view I think this is how it works. So if you set grouping then there is grouping and MC doesn't auto populate files

I see... well I actually don't see it. This program is incredibly complex as it has so many features and it gets incredibly frustrating when you are not used to it and lack the basics.
I don't know if you are talking about Grouping Functions as described on the Wiki or something else.

BTW, the idea of the Wiki is great but generally it lacks real examples of how things work, without which is like building castles in the air unless you are a developer or a real expert.
Take for instance the matter of tagging Classical Music. I know it's a vast and non consensual subject but I must have read to the north of 10 threads already and have still didn't see a concrete example of how to build a view that achieves one simple goal, common to many. At best, just theory and nothing more.

I'm talking about showing Composer -> Albums, showing all the tracks, including for other composers when it's a multi composer Album. Some say it can't be done and others say it can be, provided that one uses 'grouping" but again without showing how, which makes it totally useless.

IMO it would be of great value to have some Tutorials on the Wiki, instead of links to endless discussions where ultimately there is nothing of substance except exchanging ideas that someone without experience will never be able to implement.
The case above is one good example but I can think of many more.
Logged

lepa

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 2033
Re: Help setting Library, using Expressions
« Reply #17 on: March 03, 2023, 11:35:33 am »

I see... well I actually don't see it. This program is incredibly complex as it has so many features and it gets incredibly frustrating when you are not used to it and lack the basics.
I don't know if you are talking about Grouping Functions as described on the Wiki or something else.
Well, in your screenshot where you are trying to do grouping it says "Expression to group by:"

BTW I'm just a user not an employee of JRiver who just spend my own free time to create second test view in order to confirm if what you are trying to do is possible in MC or not. To my knowledge it is not. Like you said customization comes with a price. It takes time to learn.

Should JRiver offer some default views e.g. for classical. I don't know. Probably. I think they once tried but there was no consensus within users how to do it or how to tag files I guess or something.
Logged

cochinada

  • World Citizen
  • ***
  • Posts: 225
Re: Help setting Library, using Expressions
« Reply #18 on: March 03, 2023, 11:47:58 am »

Well, in your screenshot where you are trying to do grouping it says "Expression to group by:"

BTW I'm just a user not an employee of JRiver who just spend my own free time to create second test view in order to confirm if what you are trying to do is possible in MC or not. To my knowledge it is not. Like you said customization comes with a price. It takes time to learn.

Should JRiver offer some default views e.g. for classical. I don't know. Probably. I think they once tried but there was no consensus within users how to do it or how to tag files I guess or something.

Don't misinterpret me please. I'm very thankful for your answer and time. My rant was not meant to you nor anyone especial but it is just that is very frustrating when one does read a lot and still can't figure how to do what he wants.
Logged

JimH

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 72396
  • Where did I put my teeth?
Re: Help setting Library, using Expressions
« Reply #19 on: March 03, 2023, 02:35:37 pm »

Should JRiver offer some default views e.g. for classical. I don't know. Probably. I think they once tried but there was no consensus within users how to do it or how to tag files I guess or something.
It's been discussed here, but there is little agreement on classical music.  Many different tagging systems and expectations.
Logged

cochinada

  • World Citizen
  • ***
  • Posts: 225
Re: Help setting Library, using Expressions
« Reply #20 on: March 04, 2023, 06:03:33 am »

It's been discussed here, but there is little agreement on classical music.  Many different tagging systems and expectations.

There is no need for a consensus in order to make a Tutorial. In fact, quite the opposite. It will show people what and most importantly, how something can be done and then some will follow it and some will adapt it to their needs, but ultimately all who don't know how to implement some ideas technically, will obtain that knowledge.
Logged

cochinada

  • World Citizen
  • ***
  • Posts: 225
Re: Help setting Library, using Expressions
« Reply #21 on: March 07, 2023, 12:47:16 pm »

Hi,

I'm using these 3 Expressions on 'Expression to group by' for trying to display my (Various Composers) and Albums with a known composer in standard view, but it doesn't work!!!

joaquim@joaquim-HTPC:/media/joaquim/Multimedia1/Musica/Classica$ ls
 A-D   E-M   N-Z  '(Various Composers)'
joaquim@joaquim-HTPC:/media/joaquim/Multimedia1/Musica/Classica$



1st Expression:
If(IsEqual([File Group Location], Various Composers,8), [Album], [Composer])

2nd Expression:
If(IsEqual([File Group Location], Various Composers,8),
if(!isempty([Disc #], CD[Disc #], [Album]),
[Album])

3rd Expression:
if(!isempty([Disc #], CD[Disc #], )

I don't understand how this works (I've tried to remove "Expression to group by" and replace with "Expression to display" but it is even worse) but I find it very hard to believe, not to mention utterly disappointing, if MC cannot present this very simple view the way intended, which is:

1st level:
(Various Composers) A-D   E-M   N-Z 

2nd level:
Composer (or Album in case of (Various Composers))

3rd level:
Album (or CD # in case of (Various Composers))

4th level:
CD # (or empty in case of (Various Composers))

No matter what I do or try, I always come up with something 'Unassigned' or even more weird.
Can anyone help or confirm that MC cannot do such a thing?
Logged

lepa

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 2033
Re: Help setting Library, using Expressions
« Reply #22 on: March 07, 2023, 02:36:18 pm »

I think you need to change
if(!isempty([Disc #], CD[Disc #], )
to display something in case there is no [disc #] ie one disc albums
E.g. display CD1 for those
if(!isempty([Disc #], CD[Disc #], CD1)
Otherwise you get that unassigned
Logged

cochinada

  • World Citizen
  • ***
  • Posts: 225
Re: Help setting Library, using Expressions
« Reply #23 on: March 08, 2023, 09:04:05 am »

I think you need to change
if(!isempty([Disc #], CD[Disc #], )
to display something in case there is no [disc #] ie one disc albums
E.g. display CD1 for those
if(!isempty([Disc #], CD[Disc #], CD1)
Otherwise you get that unassigned

Yes, if I do change that expression the way you say like for instance:
if(!isempty([Disc #], CD[Disc #], potatoes)

instead of Unassigned, I'll get an icon with "potatoes" as thumbnails text, on that view "level".
Still, it doesn't serve my goal where I simply would like to ignore and skip that level altogether.
The problem is that generally, and not considering the double vs. single albums, my "Various Composers" albums have one less sublevel folder comparing to the known Composers and MC cannot deal with it or it can but I don't know how.
Logged
Pages: [1]   Go Up