SageTV Community  

Go Back   SageTV Community > SageTV Development and Customizations > SageTV Customizations > SageMC Custom Interface
Forum Rules FAQs Community Downloads Today's Posts Search

Notices

SageMC Custom Interface This forum is for discussing the user-created SageMC custom interface for SageTV.

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 01-24-2010, 04:27 PM
wirecreative wirecreative is offline
Sage Advanced User
 
Join Date: Mar 2006
Posts: 105
Dynamic Menus with Multiple path filter expression

Hi,

This weekend I used the info found in posts like the one quoted below to reorganize our videos, so we could separate our kids movies from the grown-up stuff.


Quote:
Multiple path filter expression

You can now set up multiple filters for the filtered Video/Music menus. If the 'PathFilterExcludes' is false, a video/music file will be included in the view if it exists in any of the specified paths. If 'PathFilterExcludes' is true, the file will get excluded. Here is an example of creating a music view which includes files of the directories "d:\music\Albums" and "d:\music\MP3":

Code:

<internalScreenMenuItem icon="hover_my music.png" screen="My Music" title="Music">
<evalExpression>AddStaticContext("PathFilterExprs", new_java_util_ArrayList())</evalExpression>
<evalExpression>java_util_List_add(PathFilterExprs, "d:\\music\\Albums")</evalExpression>
<evalExpression>java_util_List_add(PathFilterExprs, "d:\\music\\MP3")</evalExpression>
<evalExpression>AddStaticContext("PathFilterExcludes", false)</evalExpression>
</internalScreenMenuItem>

For each additional expreesion, add another line
Code:

<evalExpression>java_util_List_add(PathFilterExprs,...

between the two "AddStaticContext" lines.

Note: even if you don't need multiple path expressions, you will need to update your existing menu.xml to the new syntax.

Neat stuff, especially with a PIN assigned to our GROWNUP menu item, and it almost works. The only glitch is that one of the three directories we have assigned to the new FAMILY menu is not local, but a UNC path, and that directory isn't showing up in the contents of the menu when we click it.

I read that we have to make sure the path is case-sensitive, and that we need to have an imported video path that matches it exactly. Check on both items.

I can circumvent the dynamic menus by hitting the Videos button on the remote, so I can see that the UNC directory is still being connected to by Sage and the videos are still playable, we just can't get it show up along with two other directories.

Here's the relevant part of what I pasted into the menu screen:

Quote:
<internalScreenMenuItem icon="hover_my music.png" screen="Video Library Folder View" title="FAMILY">
<evalExpression>AddStaticContext("PathFilterExprs", new_java_util_ArrayList())</evalExpression>
<evalExpression>java_util_List_add(PathFilterExprs, "\\\\Magatron2007\\y")</evalExpression>
<evalExpression>java_util_List_add(PathFilterExprs, "M:\\Kids - New")</evalExpression>
<evalExpression>java_util_List_add(PathFilterExprs, "Q:\\Home")</evalExpression>
<evalExpression>AddStaticContext("PathFilterExcludes", false)</evalExpression>
</internalScreenMenuItem>
It's the first path that's playing hooky. So what are we missing?


Thanks.
Reply With Quote
  #2  
Old 01-24-2010, 10:35 PM
insomniac's Avatar
insomniac insomniac is offline
Sage Icon
 
Join Date: May 2003
Location: Concord, Ca.
Posts: 1,104
I like it!

Im having a bit of an issue with the syntax for when it comes to seperating the adult (or whatever) content from the rest of the content. Could you post an example of both types of folders. One of which would be folder excluded?

Does it look something like this??

<internalScreenMenuItem icon="hover_my music.png" screen="Video Library Folder View" title="FAMILY">
<evalExpression>AddStaticContext("PathFilterExprs", new_java_util_ArrayList())</evalExpression>
<evalExpression>java_util_List_add(PathFilterExprs, "\\\\Magatron2007\\y")</evalExpression>
<evalExpression>java_util_List_add(PathFilterExprs, "M:\\Kids - New")</evalExpression>
<evalExpression>java_util_List_add(PathFilterExprs, "Q:\\Home")</evalExpression>
<evalExpression>AddStaticContext("PathFilterExcludes", false)
<evalExpression>java_util_List_add(PathFilterExprs, "R:\\ADULT")</evalExpression>
<evalExpression>AddStaticContext("PathFilterExcludes", true)
</evalExpression>
</internalScreenMenuItem>
__________________
If you're not cheating, your not trying...

My sage rigs:
Server - Windows 2003, Intel 865 PERLL w/ P4 3.2g 1gb ram, 3-PVR250, 3-PVRUSB's, 1 Skystar2, 1 twinhan 102g, 1 starbox DVB-S Cards. Evo network QAM encoder. 1.2TB storage 6.x server + MTSAGE for DVB
Client 1/Master BR - MediaMVP running a 30" Olevia LCD TV.
Client 2/Front Room - Shuttle ST61G4 XPC 1gig ram, 60gb HD, BTC9019 wireless keyboard/mouse & Harmony 880. 6.x client. GF6600GT driving a Sony WEGA 55" rear projection tv.
Reply With Quote
  #3  
Old 01-24-2010, 10:51 PM
Fuzzy's Avatar
Fuzzy Fuzzy is offline
SageTVaholic
 
Join Date: Sep 2005
Location: Jurupa Valley, CA
Posts: 9,957
Quote:
Originally Posted by wirecreative View Post
It's the first path that's playing hooky. So what are we missing?
Looks like that would be correct. To check though, what EXACTLY is the path shown in the sage.properties file for that folder?

Quote:
Originally Posted by insomniac View Post
Im having a bit of an issue with the syntax for when it comes to seperating the adult (or whatever) content from the rest of the content. Could you post an example of both types of folders. One of which would be folder excluded?

Does it look something like this??

<internalScreenMenuItem icon="hover_my music.png" screen="Video Library Folder View" title="FAMILY">
<evalExpression>AddStaticContext("PathFilterExprs", new_java_util_ArrayList())</evalExpression>
<evalExpression>java_util_List_add(PathFilterExprs, "\\\\Magatron2007\\y")</evalExpression>
<evalExpression>java_util_List_add(PathFilterExprs, "M:\\Kids - New")</evalExpression>
<evalExpression>java_util_List_add(PathFilterExprs, "Q:\\Home")</evalExpression>
<evalExpression>AddStaticContext("PathFilterExcludes", false)
<evalExpression>java_util_List_add(PathFilterExprs, "R:\\ADULT")</evalExpression>
<evalExpression>AddStaticContext("PathFilterExcludes", true)
</evalExpression>
</internalScreenMenuItem>
You cannot set a single list to both exclude mode, AND include mode. Each of those evalExpression lines are basically setting a property prior to loading the library. PathFilterExprs property is a list of paths. the PathFilterExcludes is a true/false to tell you what to do with that path.
You shouldn't have to do both excludes AND includes. Basically, if you have stuff set as Include, then the list properties will be ALL that it looks for. If you set it for Exclude, then it will show everything that ISN'T in the list.
__________________
Buy Fuzzy a beer! (Fuzzy likes beer)

unRAID Server: i7-6700, 32GB RAM, Dual 128GB SSD cache and 13TB pool, with SageTVv9, openDCT, Logitech Media Server and Plex Media Server each in Dockers.
Sources: HRHR Prime with Charter CableCard. HDHR-US for OTA.
Primary Client: HD-300 through XBoxOne in Living Room, Samsung HLT-6189S
Other Clients: Mi Box in Master Bedroom, HD-200 in kids room
Reply With Quote
  #4  
Old 01-24-2010, 11:11 PM
insomniac's Avatar
insomniac insomniac is offline
Sage Icon
 
Join Date: May 2003
Location: Concord, Ca.
Posts: 1,104
Ok ty. I tried it the way you stated previously and it didnt work. I just got 2 different sorts with everything in them. Im now assuming its because it wont work with the Default stv w/ dynamic menus? Do I have to use sagemc to get this additional sort capability?

Quote:
Originally Posted by Fuzzy View Post



You cannot set a single list to both exclude mode, AND include mode. Each of those evalExpression lines are basically setting a property prior to loading the library. PathFilterExprs property is a list of paths. the PathFilterExcludes is a true/false to tell you what to do with that path.
You shouldn't have to do both excludes AND includes. Basically, if you have stuff set as Include, then the list properties will be ALL that it looks for. If you set it for Exclude, then it will show everything that ISN'T in the list.
__________________
If you're not cheating, your not trying...

My sage rigs:
Server - Windows 2003, Intel 865 PERLL w/ P4 3.2g 1gb ram, 3-PVR250, 3-PVRUSB's, 1 Skystar2, 1 twinhan 102g, 1 starbox DVB-S Cards. Evo network QAM encoder. 1.2TB storage 6.x server + MTSAGE for DVB
Client 1/Master BR - MediaMVP running a 30" Olevia LCD TV.
Client 2/Front Room - Shuttle ST61G4 XPC 1gig ram, 60gb HD, BTC9019 wireless keyboard/mouse & Harmony 880. 6.x client. GF6600GT driving a Sony WEGA 55" rear projection tv.

Last edited by insomniac; 01-24-2010 at 11:13 PM.
Reply With Quote
  #5  
Old 01-24-2010, 11:15 PM
Fuzzy's Avatar
Fuzzy Fuzzy is offline
SageTVaholic
 
Join Date: Sep 2005
Location: Jurupa Valley, CA
Posts: 9,957
Yeah, I don't think they work in the DefaultSTV (though they might work with the SMW or TVE ports, haven't tried.
__________________
Buy Fuzzy a beer! (Fuzzy likes beer)

unRAID Server: i7-6700, 32GB RAM, Dual 128GB SSD cache and 13TB pool, with SageTVv9, openDCT, Logitech Media Server and Plex Media Server each in Dockers.
Sources: HRHR Prime with Charter CableCard. HDHR-US for OTA.
Primary Client: HD-300 through XBoxOne in Living Room, Samsung HLT-6189S
Other Clients: Mi Box in Master Bedroom, HD-200 in kids room
Reply With Quote
  #6  
Old 01-24-2010, 11:23 PM
insomniac's Avatar
insomniac insomniac is offline
Sage Icon
 
Join Date: May 2003
Location: Concord, Ca.
Posts: 1,104
ok thanks. That saves me a bit of time. Off to decide what STV i want to run now!
__________________
If you're not cheating, your not trying...

My sage rigs:
Server - Windows 2003, Intel 865 PERLL w/ P4 3.2g 1gb ram, 3-PVR250, 3-PVRUSB's, 1 Skystar2, 1 twinhan 102g, 1 starbox DVB-S Cards. Evo network QAM encoder. 1.2TB storage 6.x server + MTSAGE for DVB
Client 1/Master BR - MediaMVP running a 30" Olevia LCD TV.
Client 2/Front Room - Shuttle ST61G4 XPC 1gig ram, 60gb HD, BTC9019 wireless keyboard/mouse & Harmony 880. 6.x client. GF6600GT driving a Sony WEGA 55" rear projection tv.
Reply With Quote
  #7  
Old 01-25-2010, 12:44 PM
wirecreative wirecreative is offline
Sage Advanced User
 
Join Date: Mar 2006
Posts: 105
Quote:
Originally Posted by Fuzzy View Post
Looks like that would be correct. To check though, what EXACTLY is the path shown in the sage.properties file for that folder?

Here's the line in the properties file:

Code:
seeker/archive_directory=P\:\\PHOTOS,4;M\:\\,1;P\:\\MUSIC\\ARCHIVE,2;P\:\\MUSIC\\NewMusic,2;P\:\\MUSIC\\Podcast,2;Q\:\\,1;\\\\Media-family\\O,1;\\\\Magatron2007\\y,1;
Which matches my xml exactly:

Quote:
<internalScreenMenuItem icon="hover_my music.png" screen="Video Library Folder View" title="FAMILY">
<evalExpression>AddStaticContext("PathFilterExprs", new_java_util_ArrayList())</evalExpression>
<evalExpression>java_util_List_add(PathFilterExprs, "\\\\Magatron2007\\y")</evalExpression>
<evalExpression>java_util_List_add(PathFilterExprs, "M:\\Kids - New")</evalExpression>
<evalExpression>java_util_List_add(PathFilterExprs, "Q:\\Home")</evalExpression>
<evalExpression>AddStaticContext("PathFilterExcludes", false)</evalExpression>
</internalScreenMenuItem>
Stumped.
Reply With Quote
  #8  
Old 01-25-2010, 06:46 PM
insomniac's Avatar
insomniac insomniac is offline
Sage Icon
 
Join Date: May 2003
Location: Concord, Ca.
Posts: 1,104
I know it may not be the best answer but it should work ok if you map a drive to it and then use it instead of UNC right?

Quote:
Originally Posted by wirecreative View Post
Here's the line in the properties file:

Code:
seeker/archive_directory=P\:\\PHOTOS,4;M\:\\,1;P\:\\MUSIC\\ARCHIVE,2;P\:\\MUSIC\\NewMusic,2;P\:\\MUSIC\\Podcast,2;Q\:\\,1;\\\\Media-family\\O,1;\\\\Magatron2007\\y,1;
Which matches my xml exactly:



Stumped.
__________________
If you're not cheating, your not trying...

My sage rigs:
Server - Windows 2003, Intel 865 PERLL w/ P4 3.2g 1gb ram, 3-PVR250, 3-PVRUSB's, 1 Skystar2, 1 twinhan 102g, 1 starbox DVB-S Cards. Evo network QAM encoder. 1.2TB storage 6.x server + MTSAGE for DVB
Client 1/Master BR - MediaMVP running a 30" Olevia LCD TV.
Client 2/Front Room - Shuttle ST61G4 XPC 1gig ram, 60gb HD, BTC9019 wireless keyboard/mouse & Harmony 880. 6.x client. GF6600GT driving a Sony WEGA 55" rear projection tv.
Reply With Quote
  #9  
Old 01-25-2010, 07:27 PM
wirecreative wirecreative is offline
Sage Advanced User
 
Join Date: Mar 2006
Posts: 105
Quote:
Originally Posted by insomniac View Post
I know it may not be the best answer but it should work ok if you map a drive to it and then use it instead of UNC right?
I don't think that's true. UNC works while mapped drives don't -- at least that was the case when I started using SageTV 5 years ago.

This, however, worked: On a whim, I converted the path in the XML to all upper-case:
Code:
            <evalExpression>java_util_List_add(PathFilterExprs, "\\\\MAGATRON2007\\Y")</evalExpression>
And that works.

All upper case for UNC paths regardless of the native case.

Solved!
Reply With Quote
  #10  
Old 01-26-2010, 05:55 AM
PLUCKYHD PLUCKYHD is offline
SageTVaholic
 
Join Date: Dec 2007
Posts: 6,257
Quote:
Originally Posted by wirecreative View Post
I don't think that's true. UNC works while mapped drives don't -- at least that was the case when I started using SageTV 5 years ago.

This, however, worked: On a whim, I converted the path in the XML to all upper-case:
Code:
            <evalExpression>java_util_List_add(PathFilterExprs, "\\\\MAGATRON2007\\Y")</evalExpression>
And that works.

All upper case for UNC paths regardless of the native case.

Solved!
not true uppercase does bot solve it for everyone it is case sensitive so you have to match case perfectly.
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Problem using dynamic menu to filter video screen Tiki SageMC Custom Interface 5 11-14-2009 06:54 AM
Customization request: Dynamic menus without dynamic menus ;-) owilsky SageTV Customizations 16 07-07-2009 03:33 PM
Multiple Path Filter Issue Skirge01 SageMC Custom Interface 8 04-20-2009 08:15 PM
Help with Dynamic Menus needed BigSwifty SageMC Custom Interface 1 05-25-2008 01:30 PM
Problem with Dynamic menus edgley SageTV Customizations 15 05-04-2007 12:10 AM


All times are GMT -6. The time now is 02:59 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2023, vBulletin Solutions Inc.
Copyright 2003-2005 SageTV, LLC. All rights reserved.