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 01-01-2012, 10:22 PM
Fuzzy's Avatar
Fuzzy Fuzzy is offline
SageTVaholic
 
Join Date: Sep 2005
Location: Jurupa Valley, CA
Posts: 9,957
User Categories in Phoenix views

Has anyone sorted the best way to filter views based on user categories? (yes, I am aware that phoenix doesn't seem to use user categories in the favorite menus, but if set up in the stock ui, they should still be accessible to use with filters. I'm thinking this will have to be done with the getmediafilemetadata call, but I have not verified that is works yet in filters. didn't want to try to re-invent the wheel if someone has already got this going.
__________________
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
  #2  
Old 01-01-2012, 11:37 PM
Fuzzy's Avatar
Fuzzy Fuzzy is offline
SageTVaholic
 
Join Date: Sep 2005
Location: Jurupa Valley, CA
Posts: 9,957
Well, made quicker progress than I had expected. I did an expression source using the filterbymethod call, as follows (in this example, "Chris" is the User Category I'm looking for):
Code:
<!DOCTYPE vfs SYSTEM "vfs.dtd">
<vfs>
	<views>
		<view name="christv" label="Chris' TV">
			<tag value="tv"/>
			<description>Chris' TV Shows grouped by Show</description>
			<source name="expression">
				<option name="expression">
					FilterByMethod(GetMediaFiles("T"), "UserCategories", "Chris", true)
				</option>
				<filter by="mediatype" value="tv" />
			</source>
			<presentation level="1">
				<group by="show"/>
				<sort by="title"/>
				<hint value="series"/>
			</presentation>

			<presentation level="2">
				<sort by="seasonepisode"/>
			</presentation>
		</view>
	</views>
</vfs>
__________________
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

Last edited by Fuzzy; 01-02-2012 at 12:28 AM.
Reply With Quote
  #3  
Old 01-02-2012, 12:29 AM
Fuzzy's Avatar
Fuzzy Fuzzy is offline
SageTVaholic
 
Join Date: Sep 2005
Location: Jurupa Valley, CA
Posts: 9,957
Something I did discover, is that if I tried to wrap the expression in the phoenix_util_ToArray() function, as is shown in the examples, it fail's out returning null... but as written, seems to function properly. Is the conversion to an array no longer needed?
__________________
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-02-2012, 08:08 AM
stuckless's Avatar
stuckless stuckless is offline
SageTVaholic
 
Join Date: Oct 2007
Location: London, Ontario, Canada
Posts: 9,713
The underlying code expects an array, and the toArray is meant to convert a list/set to an array. It could be that the expression is already returning an array, as as such, ToArray is not needed. I may not be checking if the input for ToArray is an array, and as such, if you pass an array it ends up being null (I should fix that )
Reply With Quote
  #5  
Old 01-02-2012, 09:19 AM
Fuzzy's Avatar
Fuzzy Fuzzy is offline
SageTVaholic
 
Join Date: Sep 2005
Location: Jurupa Valley, CA
Posts: 9,957
Cool.. It's just that the expression sample in the sticky thread uses the getmediafiles call and it's wrapped in a toarray... filterbymethod should be returning the same type as whats sent in to it.
__________________
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
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
New Phoenix User - a few questions tsitalon1 Phoenix 3 09-06-2011 12:57 PM
user categories for imported videos Gog Batch Metadata Tools 1 05-13-2011 11:33 AM
Testing New Features: Assign User Categories to recordings + add recording views Opus4 SageTV Beta Test Software 64 03-10-2011 09:30 AM
Auto assigning user categories? davidk21770 Batch Metadata Tools 3 01-09-2011 02:03 PM
Finding shows without user categories assigned davidk21770 SageTV Software 2 01-09-2011 03:57 AM


All times are GMT -6. The time now is 01:46 PM.


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