INTERACT FORUM

Please login or register.

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

Author Topic: I need a simple expression!  (Read 2730 times)

cron0sRXR8

  • Galactic Citizen
  • ****
  • Posts: 296
I need a simple expression!
« on: August 24, 2014, 05:03:52 am »

Hi,

I want make a groping with "Series" but I want also that j river show this information on the top with this format:

"[series] - [saga]"

Example: "Dragon Ball Z - The Planet Namek"

I've created the saga tag and works fine. I only need show the name of the saga in the top. I will select "group by.." and I will select custom. What is the code of "custom" for do it this? :P

Thank you!!!

Logged

cron0sRXR8

  • Galactic Citizen
  • ****
  • Posts: 296
Re: I need a simple expression!
« Reply #1 on: August 26, 2014, 11:08:55 am »

anyone can help me??  ?
Logged

ferday

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 1732
Re: I need a simple expression!
« Reply #2 on: August 26, 2014, 12:01:38 pm »

What does "on the top" mean?
Logged

cron0sRXR8

  • Galactic Citizen
  • ****
  • Posts: 296
Re: I need a simple expression!
« Reply #3 on: August 26, 2014, 12:07:03 pm »

What does "on the top" mean?



Sorry for my poor english :p

Logged

ferday

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 1732
Re: I need a simple expression!
« Reply #4 on: August 26, 2014, 01:17:13 pm »

no apology needed....but i can't see the image?
Logged

marko

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 9140
Re: I need a simple expression!
« Reply #5 on: August 26, 2014, 01:33:36 pm »

I think cron0 is talking about the group header...

cron0, you need to first create a new library field...
Tools > Options > Library and Folders > Manage library fields.
Add new field, call it what you like.
Select the "Calculated Data" option.
Enter [series] - [saga] in the expression field and ok all the way out.

Back in your view, from the header menu, select Group by > More (sort groups a-z) > pick the field you just created above.

better?

cron0sRXR8

  • Galactic Citizen
  • ****
  • Posts: 296
Re: I need a simple expression!
« Reply #6 on: August 26, 2014, 02:05:09 pm »

I think cron0 is talking about the group header...

cron0, you need to first create a new library field...
Tools > Options > Library and Folders > Manage library fields.
Add new field, call it what you like.
Select the "Calculated Data" option.
Enter [series] - [saga] in the expression field and ok all the way out.

Back in your view, from the header menu, select Group by > More (sort groups a-z) > pick the field you just created above.

better?


exactly!!! thank you!!!
I want this: [series] - [season] - [saga]

(I need add season for get the correct order in the series). But in the films that not have season/series/saga I get only "- -"

is it possible delete this "- -"? :P

if is not possible it doesn't matter.

thank you!
Logged

marko

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 9140
Re: I need a simple expression!
« Reply #7 on: August 27, 2014, 01:14:40 am »

You can use the same field, just go in and edit the expression, the header will update automatically with the new data.

Try this:
Code: [Select]
if(isempty([series]),[name],[series] - [season] - [saga])If series is empty, it will use Name, otherwise, it will use [series] - [season] - [saga]

If you would prefer there to be nothing for those, try this instead:
Code: [Select]
if(isempty([series]),/ ,[series] - [season] - [saga])
A better option may be to limit the view to show only files that have the [series], [season] and [saga] fields populated. You would do that using the "Customise View > Set rules for file display" option. In there, add a rule that states "Series | Is Not | Empty"

cron0sRXR8

  • Galactic Citizen
  • ****
  • Posts: 296
Re: I need a simple expression!
« Reply #8 on: August 27, 2014, 11:48:51 am »

Thank you!

I prefer this code:

if(isempty([series]),/ ,[series] - [season] - [saga])

but I have another problem now:

When I have a video-file that have the tag "serie" and it not have the tag "season" or "saga" I get a similar problem:

I get this: "seriename - - "
or I get this: "seriename - 01 - "

I preffer not see the "- -" or " -"

Is it posible delete this also? :D

Thank you master!

PS: I cant use the option for to limit the view using "rules for file display" options because I'm using a view based in the location in the "panes":

Panes:
"location (D:\my videos\)"
"rating"

set rules for display:
~sort=[Series],[Season],[Episode],[Name]

So, I don't want apply the same "rules" for all sub-folders.
Logged

marko

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 9140
Re: I need a simple expression!
« Reply #9 on: August 27, 2014, 12:44:57 pm »

Try that:
if(isempty([series]),/ ,[series]if(isempty([season]),,/ - [season])if(isempty([saga]),,/ - [saga]))

You may have already found it, but if you (or anyone else reading) is looking to get a handle on the expression language, this page http://wiki.jriver.com/index.php/Media_Center_expression_language is extremely useful.

-marko

BryanC

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 2663
Re: I need a simple expression!
« Reply #10 on: August 27, 2014, 12:52:29 pm »

Code: [Select]
if(!isempty([series]),
    if(!isempty([season]),
        if(!isempty([saga]),
            [series] - [season] - [saga],
            [series] - [season]
        ),
        if(!isempty([saga]),
            [series] - [saga],
            [series]
),
    ),
   /
)

Untested.
Logged

cron0sRXR8

  • Galactic Citizen
  • ****
  • Posts: 296
Re: I need a simple expression!
« Reply #11 on: August 27, 2014, 01:17:24 pm »

Try that:
if(isempty([series]),/ ,[series]if(isempty([season]),,/ - [season])if(isempty([saga]),,/ - [saga]))

You may have already found it, but if you (or anyone else reading) is looking to get a handle on the expression language, this page http://wiki.JRiver.com/index.php/Media_Center_expression_language is extremely useful.

-marko

Thank you marko! I've try it and works very fine! This is exactly what I was looking for!

I know the existence of of MC expression language but i'm not a programmer (i only know a little of C :P). So it's very complicated for me :P


Code: [Select]
if(!isempty([series]),
    if(!isempty([season]),
        if(!isempty([saga]),
            [series] - [season] - [saga],
            [series] - [season]
        ),
        if(!isempty([saga]),
            [series] - [saga],
            [series]
),
    ),
   /
)

Untested.

Thank you for your code BryanC.

Unfortunately it doesn't works. i get "0!", "1!" groups for any folders. But don't worry friend, it doesn't matter, now it's solved.

Logged
Pages: [1]   Go Up