SageTV Community  

Go Back   SageTV Community > SageTV Development and Customizations > SageTV v7 Customizations > Phoenix

Notices

Phoenix This forum is for discussing the user-created Phoenix custom interface for SageTV.

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 11-27-2011, 01:20 AM
lucasbuck lucasbuck is offline
Sage Advanced User
 
Join Date: Jul 2009
Posts: 127
Menu to a specific video folder

I think I'm close, but am obviously doing something wrong. For an example I'm going to use my vacation videos which are on e:\media\video\vacation. \media\video is defined in my import settings. Normally when I go to imported videos, it pulls up a list of folders in \media\video. I want a menu item to go specifically to the vacation folder.

I copied vfs.xml to the userdata/phoenix/vfs folder and added this to the end of the file:
Code:
	    <views>
            <view name="vacationvideos" label="Vacation" flat="false">
                  <option name="root" value="/media/video/vacation/"/>
                  <description>Vacation Videos</description>
                  <tag value="video"/>
                  <view-source name="sagevideoimportsv7"/>
                  <presentation>
                        <sort by="title">
                              <option name="folders-first" value="false"/>
                        </sort>
                  </presentation>
        </view>
I also added a tag:
<tag value="vacationvideos" label="Vacation"/>

I created an xml for the menu named 'vacation.xml' and placed it in the userdata menus:
Code:
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE menus SYSTEM "menus.dtd">
<menus>
      <fragment parentMenu="phoenix.menu.lz.videos" insertBefore="phoenix.menu.lz.videos.blueraydefaultbrowser">
                 <menuItem label="Vacation" name="vacationvideos" visible="true">
                        <description>VacationVideos</description>
                        <eval>AddGlobalContext("DefaultView","phoenix.view.default.videofolders" )</eval>
                        <screen name="Phoenix Universal Media Browser" />
                  </menuItem>
      </fragment>
</menus>
It creates the menu item, but when I navigate to it, it just takes me to the Video Imports screen. It's just like if I clicked on Video Imports, except in the upper left it says 'Vacation' instead. It's not dropping me down into that folder. I can see the 'Vacation' folder, but have to manually go into it.

Any suggestions welcome. I'm wondering if I'm doing this the hard way. Since when I go to Video Imports I can see the folder, is there a simpler way to go to (however I would write it) Video Imports\Vacation rather than the base Video Imports? Or am I doing it the right way, just incorrectly?
Reply With Quote
  #2  
Old 11-27-2011, 07:07 AM
stuckless's Avatar
stuckless stuckless is offline
SageTVaholic
 
Join Date: Oct 2007
Location: London, Ontario, Canada
Posts: 9,541
For the view, vacationvideos, the "root" option is a path that is relative to the view's contents. Views have their own filesystem, so if your import is \media\video and there is a subfolder for "vacation" then you'd set the root to "vacation", which if a folder relative the view's root folder.

The sagevideoimportsv7 source has been deprecated and you should use, phoenix.view.default.videofolders.

For testing/building views you might want to use bmt to see if the view contents are correct before you start on the menu. I think based on what you said, your view would look like this...

Code:
    <views>
            <view name="lucasbuck.vacationvideos" label="Vacation" flat="false">
                  <option name="root" value="vacation/"/>
                  <description>Vacation Videos</description>
                  <tag value="video"/>
                  <view-source name="phoenix.view.default.videofolders"/>
                  <presentation>
                        <sort by="title">
                              <option name="folders-first" value="false"/>
                        </sort>
                  </presentation>
        </view>
Also, remember that the view should be defined in the userdata/Phoenix/vfs/ area and not in one of the core files.

Once the view is working, you can then work on the fragment. It think you have it mostly working, but you need to specify your view name.

Code:
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE menus SYSTEM "menus.dtd">
<menus>
      <fragment parentMenu="phoenix.menu.lz.videos" insertBefore="phoenix.menu.lz.videos.blueraydefaultbrowser">
                 <menuItem label="Vacation" name="lucasbuck.menuitem.vacationvideos" visible="true">
                        <description>Vacation Videos</description>
                        <eval>AddGlobalContext("DefaultView","lucasbuck.vacationvideos" )</eval>
                        <screen name="Phoenix Universal Media Browser" />
                  </menuItem>
      </fragment>
</menus>
And for good measure, you should prefix your menu/view ids (name) with your username so that you can easily tell which views are your views when you are referencing them.
Reply With Quote
  #3  
Old 11-27-2011, 10:56 AM
lucasbuck lucasbuck is offline
Sage Advanced User
 
Join Date: Jul 2009
Posts: 127
Stupid questions:
- In the userdata I save the whole original vfs.xml, not just the part with my view code?
- Should my vfs tag be: <tag value="lucasbuck.vacationvideos" label="Vacation"/>
- What should the file name be that I save the menu xml to?

Here's what' s happening. When I navigate to 'vacation' on the menu, it pulls up a single folder 'Sage Video Imports by Folder'. If I click on that it pops up the screen with the film strip and I can choose browse. Then it just goes into the root again. So I end up in the same place, just more steps!

I do have two import paths that are media\videos. Ones on D: ones on E: if that makes a difference. It's pulling everything from both.

Thanks again for the help. This would be great if I can get it setup right.
Reply With Quote
  #4  
Old 11-27-2011, 12:56 PM
stuckless's Avatar
stuckless stuckless is offline
SageTVaholic
 
Join Date: Oct 2007
Location: London, Ontario, Canada
Posts: 9,541
Quote:
Originally Posted by lucasbuck View Post
Stupid questions:
- In the userdata I save the whole original vfs.xml, not just the part with my view code?
- Should my vfs tag be: <tag value="lucasbuck.vacationvideos" label="Vacation"/>
- What should the file name be that I save the menu xml to?

Here's what' s happening. When I navigate to 'vacation' on the menu, it pulls up a single folder 'Sage Video Imports by Folder'. If I click on that it pops up the screen with the film strip and I can choose browse. Then it just goes into the root again. So I end up in the same place, just more steps!

I do have two import paths that are media\videos. Ones on D: ones on E: if that makes a difference. It's pulling everything from both.

Thanks again for the help. This would be great if I can get it setup right.
I guess the first question I have, is does you vacation view work ok from BMT web ui, or if you load it directly using the view manager in phoenix. If not, then there's no point in troubleshooting the menu until we get that part right.

You don't need a <tag> at all. Those are mainly used internally (although there is nothing stopping you from using them if you understand how to use them)

In the userdata area, you just save YOUR additions, not the entire file. ie, your entire file would probably look like this...

Code:
<!DOCTYPE vfs SYSTEM "vfs.dtd">
<vfs>
    <views>
            <view name="lucasbuck.vacationvideos" label="Vacation" flat="false">
                  <option name="root" value="vacation/"/>
                  <description>Vacation Videos</description>
                  <tag value="video"/>
                  <view-source name="phoenix.view.default.videofolders"/>
                  <presentation>
                        <sort by="title">
                              <option name="folders-first" value="false"/>
                        </sort>
                  </presentation>
        </view>
</vfs>
As for filenames... you can use whatever filename you want.... ie for the vfs, you might use lucas-vfs.xml and for the menu lucas-menu.xml... the important thing is that they end up in their respective vfs and menus folder in the userdata/Phoenix/ area.
Reply With Quote
  #5  
Old 11-27-2011, 03:25 PM
lucasbuck lucasbuck is offline
Sage Advanced User
 
Join Date: Jul 2009
Posts: 127
In BMT if I go to the Vacation view, all it pulls up is 1 item. 'Sage Video Imports by Folder'. Inside it has 160 items. Inside of it are things it has pulled from both the D: and E: media\video folders.

Probably a dumb question, but I noticed the add view to menu in BMT. If I navigate to that folder in BMT, can I add it directly to a menu that way?

Oh, and where is the view manager in Phoenix? I missed that.
Reply With Quote
  #6  
Old 11-27-2011, 03:34 PM
wrems's Avatar
wrems wrems is offline
Sage Icon
 
Join Date: Feb 2007
Location: Marietta, GA
Posts: 1,332
I think this is the code you would want. Be aware that the root is case sensitive I believe. Check how it appears in BMT to make sure you're pointing to the correct folder.

Code:
            <view name="lucasbuck.vacationvideos" label="Vacation" flat="false">
                  <option name="root" value="/vacation/"/>
                  <option name="children-only" value="true"/>
                  <description>Vacation Videos</description>
                  <tag value="video"/>
                  <view-source name="phoenix.view.default.videofolders"/>
                  <presentation>
                        <sort by="title">
                              <option name="folders-first" value="false"/>
                        </sort>
                  </presentation>
            </view>
Reply With Quote
  #7  
Old 11-27-2011, 06:37 PM
lucasbuck lucasbuck is offline
Sage Advanced User
 
Join Date: Jul 2009
Posts: 127
Okay, I've played and played, it's worked then it would quit. I think I finally have it using Wrems code, and thank you so much. But I have a question about:
<option name="children-only" value="true"/>
Does that just block videos that are rated certain things? I took that line out (no kids, so I don't bother with the parental controls) and it doesn't work. It just takes me to the Video Import folder. I leave that line in, and it works fine. That has me stumped. I've tested it over and over. Line in, works fine, line out, no go.

Oh, and one problem was I wasn't closing with </views> Duh

Last edited by lucasbuck; 11-27-2011 at 06:42 PM.
Reply With Quote
  #8  
Old 11-27-2011, 07:54 PM
bialio's Avatar
bialio bialio is offline
SageTVaholic
 
Join Date: May 2007
Location: Frisco, TX
Posts: 3,445
The children it is talking about there are the children of the folder. Not the 2 legged ones that run around and watch cartoons.
__________________
PHOENIX 3 is here!
Server : Linux V9, Clients : Win10 and Nvidia Shield Android Miniclient
Reply With Quote
  #9  
Old 11-27-2011, 08:03 PM
lucasbuck lucasbuck is offline
Sage Advanced User
 
Join Date: Jul 2009
Posts: 127
Okay, so I'm an idiot! When I was reading Wrem's code samples, I thought I remembered something about parental controls. I stink at coding. What does that line do exactly?
Reply With Quote
Reply


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

Advanced Search
Display Modes

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
Request: Folder & View Filters to TV Menu disco340 Diamond 1 03-12-2011 06:27 AM
Adding custom main menu item -Video Folder or Category wado1971 SageTV v7 Customizations 0 08-10-2010 02:58 PM
Screen Saver - photos from specific folder? timg11 SageTV Customizations 3 12-15-2009 11:01 PM
Main Menu link to folder? flightman SageMC Custom Interface 13 09-11-2009 07:22 AM
Assign Recording to specific folder? Brent SageTV Software 11 12-18-2008 02:43 PM


All times are GMT -6. The time now is 12:20 PM.


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