SageTV Community  

Go Back   SageTV Community > SageTV Development and Customizations > SageTV v7 Customizations > Phoenix
Forum Rules FAQs Community Downloads Today's Posts Search

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 04-14-2011, 07:25 AM
wrems's Avatar
wrems wrems is offline
Sage Icon
 
Join Date: Feb 2007
Location: Marietta, GA
Posts: 1,332
Category VFS?

If I wanted to have a view for a single category and link it to a menu, how would I do that?
Reply With Quote
  #2  
Old 04-14-2011, 07:32 AM
stuckless's Avatar
stuckless stuckless is offline
SageTVaholic
 
Join Date: Oct 2007
Location: London, Ontario, Canada
Posts: 9,713
Quote:
Originally Posted by wrems View Post
If I wanted to have a view for a single category and link it to a menu, how would I do that?
If by "category" you mean, genre, then yes.

Basically you'd create a new view (copy the group by genre view) and then add a bookmark for the genre (ie folder) that you want to use.

OR

Create new view using a videos source and the <filter by="genre" value="Horror"/>

Once you have view, linking it to a menu is fairly easy... I'm sure brian or myself have posted examples of how to link a view from menu.
Reply With Quote
  #3  
Old 04-14-2011, 08:12 AM
wrems's Avatar
wrems wrems is offline
Sage Icon
 
Join Date: Feb 2007
Location: Marietta, GA
Posts: 1,332
I need some help. So far I've created a view and edited my menu:

VFS:

Code:
<!DOCTYPE vfs SYSTEM "vfs.dtd">
<vfs>
	<views>
		<view name="wr_movies" label="Movies Only">
			<description>
				Movies Only
			</description>
			<source name="mediafiles">
			</source>
			<filter by="genre" value="Movie"/>
			</filter>
		</view>
		
	</views>
</vfs>
Menu:

Code:
	<menuItem name="Movies" label="Movies" visible="true">
         <description>Browse movies only</description>
         <eval>AddGlobalContext("DefaultView", wr_movies" )</eval>
         <screen name="Phoenix Universal Media Browser" />
      </menuItem>
Am I on the right track?... I still can’t get it to work, I’ve tried a few different things. Any help is greatly appreciated.
Reply With Quote
  #4  
Old 04-14-2011, 08:14 AM
bialio's Avatar
bialio bialio is offline
SageTVaholic
 
Join Date: May 2007
Location: Frisco, TX
Posts: 3,445
In the LandingMenu.xml and GlobalMenu.xml there are a lot of examples of menu-items that link to views (TV Shows, Archived TV Shows, Browse All Titles, etc).

You basically set the view name in the 'DefaultView' variable, then launch the UMB with the 'screen' command.

btl.
__________________
PHOENIX 3 is here!
Server : Linux V9, Clients : Win10 and Nvidia Shield Android Miniclient
Reply With Quote
  #5  
Old 04-14-2011, 08:16 AM
bialio's Avatar
bialio bialio is offline
SageTVaholic
 
Join Date: May 2007
Location: Frisco, TX
Posts: 3,445
you are missing a " in the xml
Code:
	<menuItem name="Movies" label="Movies" visible="true">
         <description>Browse movies only</description>
         <eval>AddGlobalContext("DefaultView","wr_movies" )</eval>
         <screen name="Phoenix Universal Media Browser" />
      </menuItem>
__________________
PHOENIX 3 is here!
Server : Linux V9, Clients : Win10 and Nvidia Shield Android Miniclient
Reply With Quote
  #6  
Old 04-14-2011, 08:48 AM
wrems's Avatar
wrems wrems is offline
Sage Icon
 
Join Date: Feb 2007
Location: Marietta, GA
Posts: 1,332
Thanks! Right after I posted I noticed the missing quote.

I got it to work! The problem was in my view:
Code:
<vfs>
	<views>
		<view name="wr_movies" label="Movies Only">
			<description>
				Movies Only
			</description>
				<view-source name="sagevideoimportsv7"/>
				<filter by="genre" value="Movie" />
		</view>
	</views>
</vfs>
Now I get movies only and a menu for movies. No more kludging through thousands of videos that aren't movies I had to nuke my genres though in favor of a single genre/category for Movie. I can live with that I guess. We'll see how it goes.

Now I can finally stop sleeping on the couch! I can feel the bruises on my neck dissipating already.
Reply With Quote
  #7  
Old 04-14-2011, 09:00 AM
wrems's Avatar
wrems wrems is offline
Sage Icon
 
Join Date: Feb 2007
Location: Marietta, GA
Posts: 1,332
This version works better since it alphabetizes the collection. The above one had groups of alphabetized content.

Code:
<vfs>
      <views>
            <view name="wr_movies" label="Movies Only">
                  <description>Movies Only</description>
                  <view-source name="sagevideoimportsv7"/>
                  <filter by="genre" value="Movie" />
                  <presentation>
                        <sort by="title"> </sort>
                  </presentation>
            </view>
      </views>
</vfs>
Reply With Quote
  #8  
Old 04-14-2011, 09:22 AM
wrems's Avatar
wrems wrems is offline
Sage Icon
 
Join Date: Feb 2007
Location: Marietta, GA
Posts: 1,332
I need some more help. The movies view is working great for me. I’ve been editing my menu to streamline it for my use in the movies category. So I’ve hidden most of the menu items there: Browse all Titles, DVD, BluRay, Video Conversions. I’ve added 3 entries: Movies, New Movies and Browse All Content.

Movies are just movies only grouped and sorted.
New Movies is the highjacked code that Brian posted.
Browse all is the same as viewing everything by folders.

I really like it so far. It makes more sense to me. The one thing I would like help with is the New Movies. There seems to be two ways you’re getting at that info. One is the way that Brian posted, which does include home movies. Which I don’t want. The other New Movies view I’ve seen is when going through the INFO screen. This is the view that I want to add to my menu for New Movies. It is a streamlined view of movies without the other Home Movies and such.

Can you help me with locating that code snippet?
Reply With Quote
  #9  
Old 04-14-2011, 09:27 AM
bialio's Avatar
bialio bialio is offline
SageTVaholic
 
Join Date: May 2007
Location: Frisco, TX
Posts: 3,445
My view shouldn't have home movies in it - it doesn't for me at least.

Do you have home movies configured in BMT/Phoenix? Maybe if you don't the 'exclude home movies' in the view is pulling in everything.....

btl.
__________________
PHOENIX 3 is here!
Server : Linux V9, Clients : Win10 and Nvidia Shield Android Miniclient
Reply With Quote
  #10  
Old 04-14-2011, 10:05 AM
wrems's Avatar
wrems wrems is offline
Sage Icon
 
Join Date: Feb 2007
Location: Marietta, GA
Posts: 1,332
I do have the Home Video folder defined in BMT. I can view the contents within BMT’s webgui’s view for home videos too and they no longer show up in the missing metadata view.

That’s strange. My view that I added via the code you supplied gives me both movies and home videos... However the view that shows new movies in the INFO screen does not.

Are they the same code?
Have you uploaded any home videos lately? I did just the other day.

Any ideas?
Reply With Quote
  #11  
Old 04-14-2011, 10:44 AM
wrems's Avatar
wrems wrems is offline
Sage Icon
 
Join Date: Feb 2007
Location: Marietta, GA
Posts: 1,332
You know what? Upon closer inspection the home videos appearing in this new view have a common link. They are not the ones I have recently added.

I had some issues with BMT identifying a bunch of my home videos prior to Sean's addition of the Home Videos filter in BMT. The file names were something like 'P1006700' so BMT appended some horror movie 'P' and added all the actor information and the fanart and everything. It was annoying.

This was because all of them were scanned and the metadata had been applied. I guess moving forward this wouldn't be a problem. So what I did for the ones that had name of P1006700 and so on I went in and renamed the physical file in hopes that would break the connection and they would no longer appear as the movie P. So now for some reason the ones that I specifically edited are the ones in the new movies view...

Did I approach this the wrong way by manually changing the file name to something that is not a movie? How should I have done that? What can I do to clean them up? It still doesn't make sense that the INFO view for new movies doesn't show these changed home vids...
Reply With Quote
  #12  
Old 04-14-2011, 10:59 AM
wrems's Avatar
wrems wrems is offline
Sage Icon
 
Join Date: Feb 2007
Location: Marietta, GA
Posts: 1,332
Quote:
Originally Posted by wrems View Post

Code:
<vfs>
      <views>
            <view name="wr_movies" label="Movies Only">
                  <description>Movies Only</description>
                  <view-source name="sagevideoimportsv7"/>
                  <filter by="genre" value="Movie" />
                  <presentation>
                        <sort by="title"> </sort>
                  </presentation>
            </view>
      </views>
</vfs>
Something must be wrong with this code. While it works and generates the list I'm after I'm getting system messages telling me there's a Phoenix error and the above code has no grammar... Any ideas?
Reply With Quote
  #13  
Old 04-14-2011, 11:14 AM
stuckless's Avatar
stuckless stuckless is offline
SageTVaholic
 
Join Date: Oct 2007
Location: London, Ontario, Canada
Posts: 9,713
Quote:
Originally Posted by wrems View Post
Something must be wrong with this code. While it works and generates the list I'm after I'm getting system messages telling me there's a Phoenix error and the above code has no grammar... Any ideas?
Your XML files need to declare the dtd line. ie, open up the core vfs.xml and copy the very first line (ie, the DOCTYPE line) to your xml file.
Reply With Quote
  #14  
Old 04-14-2011, 12:34 PM
wrems's Avatar
wrems wrems is offline
Sage Icon
 
Join Date: Feb 2007
Location: Marietta, GA
Posts: 1,332
Here's my modified version of the movies:



I really like the fact that I can change stuff to my liking. I just need to learn how to really utilize the VFS. It seems pretty flexible. I'm just glad I could make this work.

Thanks for putting up with me, I know I've been a pita. I hope you guys don't hate me...
Reply With Quote
  #15  
Old 04-14-2011, 01:45 PM
stuckless's Avatar
stuckless stuckless is offline
SageTVaholic
 
Join Date: Oct 2007
Location: London, Ontario, Canada
Posts: 9,713
Quote:
Originally Posted by wrems View Post
Here's my modified version of the movies:



I really like the fact that I can change stuff to my liking. I just need to learn how to really utilize the VFS. It seems pretty flexible. I'm just glad I could make this work.

Thanks for putting up with me, I know I've been a pita. I hope you guys don't hate me...
See, after we get out of private beta... the more you know... better you'll be able to support the beta users
Reply With Quote
  #16  
Old 04-14-2011, 02:09 PM
wrems's Avatar
wrems wrems is offline
Sage Icon
 
Join Date: Feb 2007
Location: Marietta, GA
Posts: 1,332
I don't mind helping where and when I can. I just need to grapple with the vfs a bit longer.

Any idea about converting that new movies code into a stand-alone view that can reside in my userdata area?
Reply With Quote
  #17  
Old 04-14-2011, 03:08 PM
stuckless's Avatar
stuckless stuckless is offline
SageTVaholic
 
Join Date: Oct 2007
Location: London, Ontario, Canada
Posts: 9,713
Quote:
Originally Posted by wrems View Post
I don't mind helping where and when I can. I just need to grapple with the vfs a bit longer.

Any idea about converting that new movies code into a stand-alone view that can reside in my userdata area?
I thought I answered that a few posts back.
Reply With Quote
  #18  
Old 04-14-2011, 04:16 PM
wrems's Avatar
wrems wrems is offline
Sage Icon
 
Join Date: Feb 2007
Location: Marietta, GA
Posts: 1,332
I fixed that one. The one I’m trying to work with now is the new movies. I don’t want it on the landing zone. I want to place it as a menu item under the movie category like my screenshot above. Here’s what I have so far:

Menu code:

Code:
<menuItem name="New Movies" label="New Movies" visible="true">
      <description>Browse movies only</description>
      <eval>AddGlobalContext("DefaultView", "lz_recentimports" )</eval>
      <screen name="Phoenix Universal Media Browser" />
</menuItem>
VSF View:

Code:
<!DOCTYPE vfs SYSTEM "vfs.dtd">
<vfs>
      <views>
            <view name="lz_recentimports" label="New Movies" contextVar="MediaFile" preload="true" limit="6">
                  <eval>AddStaticContext( "MediaItem" , MediaFile )</eval>
                  <eval>AddStaticContext( "MediaType" , "VIDEO" )</eval>
                  <eval>ExecuteWidgetChainInCurrentMenuContext("RGJDX-87319")</eval>
            </view>
      </views>
</vfs>
This actually does work just fine, aside from commingling my home vids However, it does generate system messages indicating an error... So the above view is missing some code.

The error message that I receive from system messages is as follows:
Code:
Error in VFS File:.\userdata\Phoenix\vfs\wr_newmovies.xml; Attribute “contextVar” must be declared for element type “view”.
Any help with this is greatly appreciated.

TIA!

Last edited by wrems; 04-14-2011 at 06:06 PM.
Reply With Quote
  #19  
Old 04-14-2011, 06:09 PM
stuckless's Avatar
stuckless stuckless is offline
SageTVaholic
 
Join Date: Oct 2007
Location: London, Ontario, Canada
Posts: 9,713
Quote:
Originally Posted by wrems View Post
I fixed that one. The one I’m trying to work with now is the new movies. I don’t want it on the landing zone. I want to place it as a menu item under the movie category like my screenshot above. Here’s what I have so far:

Menu code:

Code:
<menuItem name="New Movies" label="New Movies" visible="true">
      <description>Browse movies only</description>
      <eval>AddGlobalContext("DefaultView", "lz_recentimports" )</eval>
      <screen name="Phoenix Universal Media Browser" />
</menuItem>
VSF View:

Code:
<!DOCTYPE vfs SYSTEM "vfs.dtd">
<vfs>
      <views>
            <view name="lz_recentimports" label="New Movies" contextVar="MediaFile" preload="true" limit="6">
                  <eval>AddStaticContext( "MediaItem" , MediaFile )</eval>
                  <eval>AddStaticContext( "MediaType" , "VIDEO" )</eval>
                  <eval>ExecuteWidgetChainInCurrentMenuContext("RGJDX-87319")</eval>
            </view>
      </view>
</views>
</vfs>
This actually does work just fine, aside from commingling my home vids However, it does generate system messages indicating an error... So the above view is missing some code.

The error message that I receive from system messages is as follows:
Code:
Error in VFS File:.\userdata\Phoenix\vfs\wr_newmovies.xml; Attribute “contextVar” must be declared for element type “view”.
Any help with this is greatly appreciated.

TIA!
You are co-mingling views and menus... Let's start with the error...

Code:
<!DOCTYPE vfs SYSTEM "vfs.dtd">
<vfs>
      <views>
            <view name="lz_recentimports" label="New Movies" contextVar="MediaFile" preload="true" limit="6">
                  <eval>AddStaticContext( "MediaItem" , MediaFile )</eval>
                  <eval>AddStaticContext( "MediaType" , "VIDEO" )</eval>
                  <eval>ExecuteWidgetChainInCurrentMenuContext("RGJDX-87319")</eval>
            </view>
      </view>
</views>
</vfs>
This is actually a very incorrect hybrid of view definition and menu entry In the <vfs> you define views, which means the <view> should have a <filter>, <presentation>, etc, but not an <eval> (that's a menu action). So yeah, the view as you've defined it in the vfs will not work.

Now from the menu...
Code:
<menuItem name="New Movies" label="New Movies" visible="true">
      <description>Browse movies only</description>
      <eval>AddGlobalContext("DefaultView", "lz_recentimports" )</eval>
      <screen name="Phoenix Universal Media Browser" />
</menuItem>
The part that I've highlighted is the view name, as defined in some vfs xml (not a menu) that will be shown when this menu item is selected. In this case, you are showing the lz_recentimports view which will show any recently added file.

What you want is something like this in your vfs xml file
Code:
		<view name="wrems_recentmovies" label="Recent Movies" flat="true" visible="false">
			<description>Recently Imported Movies</description>
			<tag value="video" />
                        <!-- pull in the recent movies view -->
			<view-source name="recentmovies"/>

                        <!-- exclude homevideos -->
                        <filter by="homevideos" scope="include"/>
		</view>
Now in your menus, reference wrems_recentmovies as the viewname, like...

Code:
<menuItem name="New Movies" label="New Movies" visible="true">
      <description>Browse movies only</description>
      <eval>AddGlobalContext("DefaultView", "wrems_recentmovies" )</eval>
      <screen name="Phoenix Universal Media Browser" />
</menuItem>
That menu template will be identical for any view that you want to launch from a menu... just keep changing the view name to be the view you want to launch.
Reply With Quote
  #20  
Old 04-14-2011, 07:37 PM
wrems's Avatar
wrems wrems is offline
Sage Icon
 
Join Date: Feb 2007
Location: Marietta, GA
Posts: 1,332
Wow! Thanks. I figured that I was doing something wrong since I don't know what I'm doing. I took your code and changed it a bit to really get down to what I want to see:

Code:
<!DOCTYPE vfs SYSTEM "vfs.dtd">
<vfs>
      <views>
            <view name="wrems_recentmovies" label="Recent Movies" flat="true" visible="false">
                  <description>Recently Imported Movies</description>
                  <tag value="video" />
                  <!-- pull in the recent movies view -->
                  <view-source name="recentmovies"/>
                  <filter by="genre" value="Movie" />
            </view>
      </views>
</vfs>
Now I get a list of only the new movies rather than just new imports. It's a great view if I do say so myself.

Thank you again for doing the very detailed instructions on accomplishing this.
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
Use BMT to set category? Julianus Batch Metadata Tools 3 04-12-2011 04:29 PM
Category Browser babgvant SageTV Customizations 0 11-10-2008 12:52 PM
Browse By Category Ericvic SageTV Studio 5 07-22-2008 09:33 PM
Add Videos Category nox71 SageTV Software 0 06-08-2008 06:12 AM


All times are GMT -6. The time now is 07:28 PM.


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