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 06-19-2016, 03:04 PM
samgreco samgreco is offline
Sage Expert
 
Join Date: Jul 2004
Location: Villa Park, IL (Outside Chicago)
Posts: 617
VFS Error and other newb questions

I am certainly not a newb to Sage, but absolutely to Phoenix. I currently use Gemstone, but it always seemed "heavy" to me. It's slow on my HD200 and not great on my FireTV either. So...

I never seemed to have the time to wrap my head around Phoenix, but always wanted to. I am now finally diving in, since I see Bialio back and talking about V3. Got my attention

First, I have created a View (or at least attempted), but I am getting an error when I load Sage. So I went into BMT and loaded it, found a couple of missing " but that didn't seem to fix it. I get:

Code:
Element type "view" must be followed by either attribute specifications, ">" or "/>"
But here is the view:

Code:
<!DOCTYPE vfs SYSTEM "vfs.dtd">
<vfs>
      <views>
            <view name="movies_by_path" label="Movies by Path" flat="false" visible="false">
                  <description>All of our Movies</description>
				  <option name="root" value="/Movies/"/>
                  <view-source name="allinportedvideo"/>
            </view>

            <view name="sg_movies" label="Movies" flat="true" visible="true"> 
			<description>Movies</description>
			<tag value="movies"/>
                  <view-source name="movies_by_path"/>
                  <presentation>
                        <sort by="title">
			       <option name="sort-order" value="asc"/>
                               <option name="ignore-all" value="true"/>
			</sort>
                  </presentation>
            </view>
      </views>
</vfs>

What I am trying to build is based on my video import folders. Like so:

\\Server\Drive\Video - as the import folder - with the following subfolders, all as separate views which will then have separate menu items.

\Movies
\Shorts
\Trailers
\Videos
\TV Library

etc.

So where am I going wrong in the view above? I think if I can get that, I should be able to work through the rest.
Reply With Quote
  #2  
Old 06-19-2016, 07:54 PM
jusjoken jusjoken is offline
Sage Icon
 
Join Date: Dec 2005
Location: Minneapolis MN
Posts: 2,195
I noticed the view-source line has a spelling error for "allinportedvideo"

k
Reply With Quote
  #3  
Old 06-20-2016, 12:11 AM
samgreco samgreco is offline
Sage Expert
 
Join Date: Jul 2004
Location: Villa Park, IL (Outside Chicago)
Posts: 617
I don't know how many times I looked at that and didn't see it.

Unfortunately, it didn't fix it.

I have tried a couple of variations and both are giving me the following error (expect for line number):

Code:
2016-06-20 01:05:41,770 [AWT-EventQueue-0] WARN  sagex.phoenix.vfs.VFSManager - VFS FILE: .\userdata\Phoenix\vfs\SG Movies.xml HAS Validataion Errors and will not be included.
org.dom4j.DocumentException: Error on line 8 of document  : The content of element type "view" must match "(option*,description?,tag*,source*,view-source*,filter*,presentation*)". Nested exception: The content of element type "view" must match "(option*,description?,tag*,source*,view-source*,filter*,presentation*)".
My two attempts are (and yes, I changed the source to videofolders. It gave my all folders in a simplified view ONCE):

Code:
<!DOCTYPE vfs SYSTEM "vfs.dtd">
<vfs>
      <views>
            <view name="movies_by_path" label="Movies by Path" flat="false" visible="false">
                  <description>All of our Movies</description>
				  <option name="root" value="/Movies/"/>
                  <view-source name="phoenix.view.default.videofolders"/>
            </view>

            <view name="sg_movies" label="SG Movies" flat="true" visible="true"> 
			<description>Movies</description>
			<tag value="movies"/>
                  <view-source name="movies_by_path"/>
                  <presentation>
					<sort by="title">
						<option name="sort-order" value="asc"/>
						<option name="ignore-all" value="true"/>
					</sort>
                  </presentation>
            </view>
      </views>
And:

Code:
<!DOCTYPE vfs SYSTEM "vfs.dtd">
<vfs>
<views>
		<view name="SG_Movies" label="SG Movies" flat="false">
			<filter by="filepath">
				<option name="use-regex-matching" value="true"/>
				<option name="value" value="Movies\\"/>
			</filter>
		<description>Movies</description>
			<tag value="video"/>
			<view-source name="phoenix.view.default.videofolders"/>
		<presentation>
			<sort by="title">
				<option name="sort-order" value="asc"/>
				<option name="folders-first" value="false"/>
            </sort>
		</presentation>
		</view>
</views>
</vfs>
Any clues what I am missing here?
Reply With Quote
  #4  
Old 06-20-2016, 12:30 AM
samgreco samgreco is offline
Sage Expert
 
Join Date: Jul 2004
Location: Villa Park, IL (Outside Chicago)
Posts: 617
And this one just drops me into the root import folder and does not put me in the Movies folder. So it's basically the by Folder nav.

Code:
<!DOCTYPE vfs SYSTEM "vfs.dtd">
<vfs>
<views>
		<view name="SG_Movies" label="SG Movies by Path" flat="false">
		<option name="root" value="/Movies/"/>
		<description>Movies</description>
		<tag value="video"/>
		<view-source name="phoenix.view.default.videofolders"/>
		<presentation>
			<sort by="title">
				<option name="folders-first" value="true"/>
                        </sort>
		</presentation>
		</view>
</views>
</vfs>
Reply With Quote
  #5  
Old 06-20-2016, 04:58 AM
stuckless's Avatar
stuckless stuckless is offline
SageTVaholic
 
Join Date: Oct 2007
Location: London, Ontario, Canada
Posts: 9,610
The error (option*,description?,tag*,source*,view-source*,filter*,presentation*) lists the elements in order that they must appear in the xml file. In your case, your View, listed <description> then <option> but option should be the first child. Xml with DTD can be very picky...

In another file I see you have <filter> before description, and filter must be second last element right before <presentation>.

something like option* means that it can exist 0 or more times...but if it does exist, then it must exist in the order that that is specified in the dtd file (which the error dumps out)
Reply With Quote
  #6  
Old 06-20-2016, 07:37 AM
samgreco samgreco is offline
Sage Expert
 
Join Date: Jul 2004
Location: Villa Park, IL (Outside Chicago)
Posts: 617
Thanks Sean. I did not realize that order was an issue. That explains quite a lot.

But let's take the last one I posted. It basically gives me a Sage Imports by Folder view. But I am trying to get it to drop me into a subfolder of the main import folder. Movies. And I have other subfolders I will end up creating views for.

So why doesn't the last view I posted drop me into the Movies folder?

If I can get my head around that, I can duplicate it for the rest of the folders and I'm done.
Reply With Quote
  #7  
Old 06-20-2016, 08:43 AM
stuckless's Avatar
stuckless stuckless is offline
SageTVaholic
 
Join Date: Oct 2007
Location: London, Ontario, Canada
Posts: 9,610
Quote:
Originally Posted by samgreco View Post
Thanks Sean. I did not realize that order was an issue. That explains quite a lot.

But let's take the last one I posted. It basically gives me a Sage Imports by Folder view. But I am trying to get it to drop me into a subfolder of the main import folder. Movies. And I have other subfolders I will end up creating views for.

So why doesn't the last view I posted drop me into the Movies folder?

If I can get my head around that, I can duplicate it for the rest of the folders and I'm done.
The "root" and "bookmark" fields in the views are not implemented correctly in my mind (even though I implemented them ).

Try,
Code:
<option name="root" value="/SG Movies by Path/Movies/"/>
I think the "root" needs to have the root view name in there (which is counter-intuitive, and not sure why it is that way)
Reply With Quote
  #8  
Old 06-20-2016, 08:55 AM
samgreco samgreco is offline
Sage Expert
 
Join Date: Jul 2004
Location: Villa Park, IL (Outside Chicago)
Posts: 617
Thanks again Sean.

But nope, that didn't do it either. Would the filter by filepath be a better choice?
Reply With Quote
  #9  
Old 06-20-2016, 09:08 AM
stuckless's Avatar
stuckless stuckless is offline
SageTVaholic
 
Join Date: Oct 2007
Location: London, Ontario, Canada
Posts: 9,610
Quote:
Originally Posted by samgreco View Post
Thanks again Sean.

But nope, that didn't do it either. Would the filter by filepath be a better choice?
Sorry for throwing darts here... but a couple of things....

I looked in the code and the "root" appears to be implemented correctly... ie, using "/Movies" should work (no trailing forward slash).

But, also, is your folder name "Movies" or "movies"... ie, case matters.

So when you load up this view... what do you see as the child folders?

I have used "root" in the past, but it's been awhile.
Reply With Quote
  #10  
Old 06-20-2016, 10:14 AM
samgreco samgreco is offline
Sage Expert
 
Join Date: Jul 2004
Location: Villa Park, IL (Outside Chicago)
Posts: 617
Where I end up is "Sage Video Imports by Folder" which shows my all of the folders under the main import folder. But quite oddly, it seems to be pulling one movie into the list. So it is like this:

Import folder: \\Server\Video
Subfolders:

\Movies
\Shorts
\Trailers
\Some seemingly random movie
\Home Videos
Reply With Quote
  #11  
Old 06-21-2016, 08:23 PM
samgreco samgreco is offline
Sage Expert
 
Join Date: Jul 2004
Location: Villa Park, IL (Outside Chicago)
Posts: 617
I am inching closer. I have the list I am looking for using the following:

Code:
<!DOCTYPE vfs SYSTEM "vfs.dtd">
<vfs>
<views>
		<view name="SG_Movies" label="SG Movies by Path" flat="false">
		<option name="root" value="/Movies"/>
		<option name="children-only" value="true"/>
		<description>Movies</description>
		<tag value="video"/>
		<view-source name="phoenix.view.default.videofolders" >
		</view-source>
		<presentation>
			<sort by="title">
				<option name="sort-order" value="asc"/>
				<option name="ignore-all" value="true"/>
			</sort>
		</presentation>
		</view>
</views>
</vfs>
But the list takes me to the "folder" above the movie. So as an example, my library is laid out like so:
\\ImportFolder\Movies\Back to the Future
\\ImportFolder\Movies\Back to the Future II
\\ImportFolder\Movies\Back to the Future III

and so on. So when I am scrolling through the list, I get just the name, without any metadata in the banner. If I select the banner, it goes one level down and I get the same banner WITH the metadata. I hope that makes sense. Can I get the view to show JUST the "second level"?

Last edited by samgreco; 06-21-2016 at 08:28 PM.
Reply With Quote
  #12  
Old 06-22-2016, 04:56 AM
stuckless's Avatar
stuckless stuckless is offline
SageTVaholic
 
Join Date: Oct 2007
Location: London, Ontario, Canada
Posts: 9,610
Quote:
Originally Posted by samgreco View Post
I am inching closer. I have the list I am looking for using the following:

Code:
<!DOCTYPE vfs SYSTEM "vfs.dtd">
<vfs>
<views>
		<view name="SG_Movies" label="SG Movies by Path" flat="false">
		<option name="root" value="/Movies"/>
		<option name="children-only" value="true"/>
		<description>Movies</description>
		<tag value="video"/>
		<view-source name="phoenix.view.default.videofolders" >
		</view-source>
		<presentation>
			<sort by="title">
				<option name="sort-order" value="asc"/>
				<option name="ignore-all" value="true"/>
			</sort>
		</presentation>
		</view>
</views>
</vfs>
But the list takes me to the "folder" above the movie. So as an example, my library is laid out like so:
\\ImportFolder\Movies\Back to the Future
\\ImportFolder\Movies\Back to the Future II
\\ImportFolder\Movies\Back to the Future III

and so on. So when I am scrolling through the list, I get just the name, without any metadata in the banner. If I select the banner, it goes one level down and I get the same banner WITH the metadata. I hope that makes sense. Can I get the view to show JUST the "second level"?
If you don't want folders... set flat="true" (instead of false). (flat means to flatten the structure so there are no child folders in the heirarchy)

But, if you are doing that.. .then why not just use one of the Movie views, since they are already flat

A folder structure view like you are using for a source is expensive to create... and then, in the end, you are "flattening" it.
Reply With Quote
  #13  
Old 06-22-2016, 07:04 AM
samgreco samgreco is offline
Sage Expert
 
Join Date: Jul 2004
Location: Villa Park, IL (Outside Chicago)
Posts: 617
The reason I was trying this is that I have things like shorts, trailers and intros that are separated in folders. And when I use one of the existing views it pulls everything in. In Gemstone, I was always able to just filter by folder.

I get the feeling I'm missing something that should be obvious
Reply With Quote
  #14  
Old 06-22-2016, 09:06 AM
stuckless's Avatar
stuckless stuckless is offline
SageTVaholic
 
Join Date: Oct 2007
Location: London, Ontario, Canada
Posts: 9,610
Quote:
Originally Posted by samgreco View Post
The reason I was trying this is that I have things like shorts, trailers and intros that are separated in folders. And when I use one of the existing views it pulls everything in. In Gemstone, I was always able to just filter by folder.

I get the feeling I'm missing something that should be obvious
I think that everything you want to do, can be done... in one or more ways... For example, setting the flat="true" should do this for you.

You can also build a view using the allmovies (needs the full name of the view) then filter by filepath. The filepath filter can be a starts with or regular expression.

Code:
<filter by="filepath" use-regex-matching="false" value="C:\Media\Movies\" />
or
Code:
<filter by="filepath" use-regex-matching="true" value=".*\\Moves\\.*" />
The above filters assume you are on on windows so it's using \ instead of /
Reply With Quote
  #15  
Old 06-22-2016, 09:38 AM
samgreco samgreco is offline
Sage Expert
 
Join Date: Jul 2004
Location: Villa Park, IL (Outside Chicago)
Posts: 617
Any issue using UNC?
Reply With Quote
  #16  
Old 06-22-2016, 10:02 AM
samgreco samgreco is offline
Sage Expert
 
Join Date: Jul 2004
Location: Villa Park, IL (Outside Chicago)
Posts: 617
Every time I try to use filters I get errors. I am seeing:

2016-06-22 10:56:55,307 [AWT-EventQueue-0] WARN sagex.phoenix.vfs.VFSManager - VFS FILE: .\userdata\Phoenix\vfs\movies-filtered-by-path.xml HAS Validataion Errors and will not be included.
org.dom4j.DocumentException: Error on line 12 of document : Attribute "use-regex-matching" must be declared for element type "filter". Nested exception: Attribute "use-regex-matching" must be declared for element type "filter".

The view I am using is:

Code:
<!DOCTYPE vfs SYSTEM "vfs.dtd">
<vfs>
	<views>
      <view name="AllMoviesFiltered" label="SG Movies Filtered by Path" flat="true">
         <description>Movies from all sources filtered by path</description>
         <tag value="video"/>
         <tag value="movie"/>
         <tag value="movie"/>
         <tag value="default"/>
         <view-source name="phoenix.view.primary.importedmovies"/>
			<filter by="filepath" use-regex-matching="true" value=".*\\Movies\\.*" />
        <presentation>
            <sort by="title">
               <option name="ignore-all" value="true"/>
            </sort>
		</presentation>
      </view>
	</views>
</vfs>
Reply With Quote
  #17  
Old 06-22-2016, 10:56 AM
stuckless's Avatar
stuckless stuckless is offline
SageTVaholic
 
Join Date: Oct 2007
Location: London, Ontario, Canada
Posts: 9,610
Quote:
Originally Posted by samgreco View Post
Every time I try to use filters I get errors. I am seeing:

2016-06-22 10:56:55,307 [AWT-EventQueue-0] WARN sagex.phoenix.vfs.VFSManager - VFS FILE: .\userdata\Phoenix\vfs\movies-filtered-by-path.xml HAS Validataion Errors and will not be included.
org.dom4j.DocumentException: Error on line 12 of document : Attribute "use-regex-matching" must be declared for element type "filter". Nested exception: Attribute "use-regex-matching" must be declared for element type "filter".

The view I am using is:

Code:
<!DOCTYPE vfs SYSTEM "vfs.dtd">
<vfs>
	<views>
      <view name="AllMoviesFiltered" label="SG Movies Filtered by Path" flat="true">
         <description>Movies from all sources filtered by path</description>
         <tag value="video"/>
         <tag value="movie"/>
         <tag value="movie"/>
         <tag value="default"/>
         <view-source name="phoenix.view.primary.importedmovies"/>
			<filter by="filepath" use-regex-matching="true" value=".*\\Movies\\.*" />
        <presentation>
            <sort by="title">
               <option name="ignore-all" value="true"/>
            </sort>
		</presentation>
      </view>
	</views>
</vfs>

Try this...
Code:
<!DOCTYPE vfs SYSTEM "vfs.dtd">
<vfs>
	<views>
      <view name="AllMoviesFiltered" label="SG Movies Filtered by Path" flat="true">
         <description>Movies from all sources filtered by path</description>
         <tag value="video"/>
         <tag value="movie"/>
         <tag value="movie"/>
         <tag value="default"/>
         <view-source name="phoenix.view.primary.importedmovies"/>
			<filter by="filepath"  value=".*\\Movies\\.*">
                              <option name="use-regex-matching" value="true"/>
                        </filter>
        <presentation>
            <sort by="title">
               <option name="ignore-all" value="true"/>
            </sort>
		</presentation>
      </view>
	</views>
</vfs>
Reply With Quote
  #18  
Old 06-22-2016, 10:59 AM
samgreco samgreco is offline
Sage Expert
 
Join Date: Jul 2004
Location: Villa Park, IL (Outside Chicago)
Posts: 617
Same error.

2016-06-22 11:58:41,384 [AWT-EventQueue-0] WARN sagex.phoenix.vfs.VFSManager - VFS FILE: .\userdata\Phoenix\vfs\movies-filtered-by-path.xml HAS Validataion Errors and will not be included.
org.dom4j.DocumentException: Error on line 11 of document : Attribute "use-regex-matching" must be declared for element type "filter". Nested exception: Attribute "use-regex-matching" must be declared for element type "filter".
Reply With Quote
  #19  
Old 06-22-2016, 11:02 AM
samgreco samgreco is offline
Sage Expert
 
Join Date: Jul 2004
Location: Villa Park, IL (Outside Chicago)
Posts: 617
I think I take it back. This seemed to work:

Code:
<!DOCTYPE vfs SYSTEM "vfs.dtd">
<vfs>
	<views>
      <view name="AllMoviesFiltered" label="SG Movies Filtered by Path" flat="true">
         <description>Movies from all sources filtered by path</description>
         <tag value="video"/>
         <tag value="movie"/>
         <tag value="movie"/>
         <tag value="default"/>
         <view-source name="phoenix.view.primary.importedmovies"/>
			<filter by="filepath" use-regex-matching="true" value=".*\\Movies\\.*" />
        <presentation>
            <sort by="title">
               <option name="ignore-all" value="true"/>
            </sort>
		</presentation>
      </view>
	</views>
</vfs>
Reply With Quote
  #20  
Old 06-22-2016, 08:12 PM
jusjoken jusjoken is offline
Sage Icon
 
Join Date: Dec 2005
Location: Minneapolis MN
Posts: 2,195
Quote:
Originally Posted by samgreco View Post
The reason I was trying this is that I have things like shorts, trailers and intros that are separated in folders. And when I use one of the existing views it pulls everything in. In Gemstone, I was always able to just filter by folder.

I get the feeling I'm missing something that should be obvious
You could load gemstone and build the flow that works and then display the view summary which will give you a good idea of how gemstone is using phoenix view to build the create the flow output....

k
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
A few Newb Questions Before I Buy epictetus Hardware Support 16 06-01-2011 05:43 AM
3 questions from a NewB taylormade General Discussion 9 09-11-2008 12:09 PM
Several NewB Questions, Help Please! acegolfer SageTV Software 2 12-17-2006 10:05 AM
Some newb questions jersiq General Discussion 7 07-27-2006 09:38 PM
Newb Questions deliverer General Discussion 5 11-27-2005 01:33 AM


All times are GMT -6. The time now is 04:16 AM.


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