|
Phoenix This forum is for discussing the user-created Phoenix custom interface for SageTV. |
|
Thread Tools | Search this Thread | Display Modes |
#1
|
||||
|
||||
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 |
#2
|
||||
|
||||
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. |
#3
|
||||
|
||||
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 |
#4
|
||||
|
||||
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 )
__________________
Batch Metadata Tools (User Guides) - SageTV App (Android) - SageTV Plex Channel - My Other Android Apps - sagex-api wrappers - Google+ - Phoenix Renamer Downloads SageTV V9 | Android MiniClient |
#5
|
||||
|
||||
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 |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
|
|
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 |