SageTV Community  

Go Back   SageTV Community > SageTV Development and Customizations > SageTV v7 Customizations > Batch Metadata Tools

Notices

Batch Metadata Tools This forums is for discussing the user-created Batch Metadata Tools for SageTV.

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 10-25-2012, 08:58 AM
silkshadow's Avatar
silkshadow silkshadow is offline
Sage Expert
 
Join Date: Oct 2004
Location: Philippines
Posts: 550
Filter by path

So I am neck deep into VFS and I am blown away how useful it is. I've been creating views all evening. I've come up with 2 questions. I was wondering if there was a way to filter by path?

Specifically I am working on sports views. My sports are in:

//<servername>/media/Sports/<name of sport>
Sage import path: //<servername>/media

So something like:

Code:
      <filter by="path">
      <option name="scope" value="media/Sports/Football"/>
      <option name="scope" value="include"/>
      </filter>
My second question is one I think is just an XML format issue. I have one view I was working on to filter out watched episodes and a genre. Code fragment looks like:

Code:
			
<view-source name="phoenix.view.primary.importedtv"/>
      <filter by="genre" value="Mature">
      <option name="scope" value="exclude"/>
      </filter>
      <filter by="watched">
      <option name="scope" value="exclude"/>
      </filter>
I think I just do not know how to correctly list multiple filters. Should I be using something like <filters></filters> instead?

Thanks!
Reply With Quote
  #2  
Old 10-25-2012, 09:31 AM
stuckless's Avatar
stuckless stuckless is offline
SageTVaholic
 
Join Date: Oct 2007
Location: London, Ontario, Canada
Posts: 9,712
The filter by path problem that you mention might be solvable by using the "bookmark" or "root" behaviour of a view.

bookmark and root options are used to position the view automatically after creation... and the difference is that root will make the folder path of the view to be the root (ie, user cannot navigate up).

Here's a view that I use to point to where I put new movies before I organize them.

Code:
                <view name="sls_newmovies" label="New Movies" flat="false">
                        <option name="bookmark" value="/Movies/New"/>
                        <option name="children-only" value="true"/>

                        <description>Movies in the New folder</description>
                        <tag value="video"/>

                            <view-source name="phoenix.view.default.videofolders"/>
                </view>
Also, there is a filepath filter that can probably do something similar to what you are asking for as well.

Check out the VFS page for a list of filters/sorters/groupers/sources, etc... This list may be a little out of date... i may need to generate an updated version with the newer list of filters, etc.

For multiple Filters... You cannot put multiple filter children in a View. You can mimic the behaviour if you create a new "filter" in the <filters> section that describes it's filters... For example the missing metada filter looks like this...

Code:
                <item-group name="missingmetadata-ext" label="Missing Metadata extended Filter" mode="and">
                        <filter by="homevideos" scope="exclude"/>
                        <filter by="missingmetadata"/>
                        <tag value="video"/>
                        <tag value="tv"/>
                </item-group>
So this "excludes" homevideos but includes missingmetadata.

Here's a link to the x-vfs.xml file for reference... check the <filters> section.
Reply With Quote
  #3  
Old 10-25-2012, 11:46 AM
silkshadow's Avatar
silkshadow silkshadow is offline
Sage Expert
 
Join Date: Oct 2004
Location: Philippines
Posts: 550
Awesome, thanks again! I have some xmls to play with tomorrow .
Reply With Quote
  #4  
Old 10-25-2012, 11:48 AM
stuckless's Avatar
stuckless stuckless is offline
SageTVaholic
 
Join Date: Oct 2007
Location: London, Ontario, Canada
Posts: 9,712
Quote:
Originally Posted by silkshadow View Post
Awesome, thanks again! I have some xmls to play with tomorrow .
Also for certain types of filtering you can look at the PQL (Phoenix Query Language) as well. You can do some pretty complex queries against the metadata, but unfortunately you can access fields like "watched" since that is not a metadata field
Reply With Quote
  #5  
Old 10-26-2012, 02:46 AM
silkshadow's Avatar
silkshadow silkshadow is offline
Sage Expert
 
Join Date: Oct 2004
Location: Philippines
Posts: 550
Holy crap Stuckless, this is like a full blown CMS system. Is there anything you didn't think to include? Looking forward to diving into PQL tonight.
Reply With Quote
  #6  
Old 10-26-2012, 06:04 AM
stuckless's Avatar
stuckless stuckless is offline
SageTVaholic
 
Join Date: Oct 2007
Location: London, Ontario, Canada
Posts: 9,712
Something else to keep in mind when you are using BMT is that there is an undocumented "long press" operation for a media file. So, when you are browsing a view, if you long press/click on the item it will give a menu of operations for that specific item, such as, delete it, set watch, and one of my favorites, video thumbnails. I used to use the video thumbnails to look at a recording to see if it was corrupted/correct, back when my hdpvr was giving my issues (although I haven't had to use it for some time now).
Reply With Quote
  #7  
Old 10-27-2012, 02:50 AM
silkshadow's Avatar
silkshadow silkshadow is offline
Sage Expert
 
Join Date: Oct 2004
Location: Philippines
Posts: 550
Thanks! This is a very cool little hidden pop up. Video thumbnails and debugged metadata details is beyond great.
Reply With Quote
  #8  
Old 10-31-2012, 08:03 AM
TwistedMelon TwistedMelon is offline
Sage Expert
 
Join Date: Aug 2005
Location: Ontario, Canada
Posts: 554
Can anyone shed some light on how to install the little xml snippet above to obtain a different view in BMT? I'd also very much like to create a few views that are rooted at specific points of a remote filesystem.
__________________
Bruno
Twisted Melon Inc.
While you're clicking, check out my Mini Theater custom build.
Reply With Quote
  #9  
Old 11-05-2012, 01:42 PM
silkshadow's Avatar
silkshadow silkshadow is offline
Sage Expert
 
Join Date: Oct 2004
Location: Philippines
Posts: 550
Here is one I did:

Code:
<!DOCTYPE vfs SYSTEM "vfs.dtd">
<vfs>
	<views>
		<view name="silkmovlang" label="1Silk Foreign Movies by Language" flat="true">
			<tag value="movie"/>
			<view-source name="phoenix.view.source.allimportedvideo"/>
      <filter by="filepath">
        <option name="use-regex-matching" value="true"/>
        <option name="value" value="Movies\\Foreign Movies"/>
			</filter>	

      <presentation level="1">
        <group by="metadata">
          <option name="empty-foldername" value="Unknown"/>
          <option name="field" value="Language"/>
        </group>
        <sort by="title">
					<option name="sort-order" value="asc"/>
					<option name="folders-first" value="false"/>
				</sort>
      </presentation>	
      
			<presentation level="2">
				<group by="title">
					<option name="prune-single-item-groups" value="true"/>
				</group>
    			<sort by="title">
					<option name="sort-order" value="asc"/>
					<option name="folders-first" value="false"/>
          <option name="ignore-all" value="true"/>
				</sort>
			</presentation>		
			
      <presentation level="3">
    			<sort by="title">
					<option name="sort-order" value="asc"/>
					<option name="folders-first" value="false"/>
          <option name="ignore-all" value="true"/>
				</sort>          
			</presentation>
      
		</view>
	</views>
</vfs>
The key bit for filter by path is this:

Code:
      <filter by="filepath">
        <option name="use-regex-matching" value="true"/>
        <option name="value" value="Movies\\Foreign Movies"/>
			</filter>
I am using UNC paths, so the value is a piece of the overall path that matches to only the files I want to see in this view. I have a ..\BRD\Foreign Movies folder as well and I did not want that included in this view. So I need to add the Movies\ in the regex match. The match is case sensitive.

Last edited by silkshadow; 11-05-2012 at 01:45 PM.
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
Dynamic Menus with Multiple path filter expression wirecreative SageMC Custom Interface 9 01-26-2010 05:55 AM
Path sam.griffin.bht SageTV Studio 9 06-23-2009 11:21 AM
Multiple Path Filter Issue Skirge01 SageMC Custom Interface 8 04-20-2009 08:15 PM
UNC path help APillowOfClouds SageTV Software 12 02-24-2009 01:25 AM
what is the path? rnewman SageTV Software 5 06-19-2007 05:02 PM


All times are GMT -6. The time now is 03:42 PM.


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