|
SageTV Studio Discussion related to the SageTV Studio application produced by SageTV. Questions, issues, problems, suggestions, etc. relating to the Studio software application should be posted here. |
|
Thread Tools | Search this Thread | Display Modes |
#1
|
|||
|
|||
Help with Filtering MediaFile[]
I want to do something like
Code:
MediaList = FilterByMethod(MediaList, "GetChannelNumber", "1001", false) |
#2
|
|||
|
|||
This works for me:
FilterByMethod(GetAllChannels(), "GetChannelNumber", "2", true) So it only returns channel number 2.... but thats not what you want and I don't have any recordings on my test server but you maybe able to use: FilterByMethod(MediaFiles, "GetAiringChannelNumber", "2", false) Can't be sure though but worth a shot I guess. EDIT Actually that does work and I did have two recordings to try it with: FilterByMethod(GetMediaFiles("T"), "GetAiringChannelNumber", "26", false) Which returned one of my two recordings.
__________________
Server - Win7 64bit, 2.4Ghz Intel Core 2 Duo, TBS 6284 PCI-E Quad DVB-T2 Tuner, 3 x HD200 & 1 x HD300 extenders Last edited by jaminben; 04-26-2011 at 08:25 AM. |
#3
|
|||
|
|||
OK I feel stupid now. I have no idea why I couldn't get this to work initially, but now it's working fine. I think the fact that it's a MedaiFile and not an Airing scared me off too quickly. :-)
Perhaps it was because I used the wrong method initially. That's what I get for trying to do this at 2am! Thanks! |
#4
|
||||
|
||||
Quote:
Your initial example did not work because GetChannelNumber() needs a Channel Object and not a MediaFile or Airing.
__________________
Sage Server: 8th gen Intel based system w/32GB RAM running Ubuntu Linux, HDHomeRun Prime with cable card for recording. Runs headless. Accessed via RD when necessary. Four HD-300 Extenders. |
#5
|
|||
|
|||
This is REALLY useful information to know! Reading through the API I don't remember seeing anything hinting at this. Thanks for that tip. I'm certain it will come in handy in the future.
|
#6
|
||||
|
||||
Quote:
The docs for the two API calls shows these details for the return values and parameters: public java.lang.String GetChannelNumber(sage.Channel Channel) public java.lang.String GetAiringChannelNumber(sage.Airing Airing) They both return strings, but one takes a Channel object parameter while the other needs an Airing. SageTV's automatic conversion from one data type to another, when possible, is covered in the Studio manual on pages 16-17, including the example of converting Airing <--> MediaFile. If you haven't already read through the Studio manual and gone through the tutorials, you should do so. - Andy
__________________
SageTV Open Source v9 is available. - Read the SageTV FAQ. Older PDF User's Guides mostly still apply: SageTV V7.0 & SageTV Studio v7.1. - Hauppauge remote help: 1) Basics/Extending it 2) Replace it 3) Use it w/o needing focus - HD Extenders: A) FAQs B) URC MX-700 remote setup Note: This is a users' forum; see the Rules. For official tech support fill out a Support Request. |
#7
|
||||
|
||||
Yes. It's also covered in the API JavaDocs if you read the first few paragraphs that describe the class.
__________________
Sage Server: 8th gen Intel based system w/32GB RAM running Ubuntu Linux, HDHomeRun Prime with cable card for recording. Runs headless. Accessed via RD when necessary. Four HD-300 Extenders. |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Filtering out vs filtering in | Spectrum | SageTV Beta Test Software | 9 | 09-29-2010 11:34 AM |
Sorting and Filtering Videos? | can3gxw | SageTV Beta Test Software | 0 | 05-28-2010 02:28 AM |
Filtering encrypted channels during DVB scans | Lucas | SageTV Beta Test Software | 2 | 06-23-2009 04:27 PM |
Filtering converted videos | srothwell | SageTV Software | 3 | 12-14-2007 11:21 PM |
Pre-filtering | jeffoz1 | Hardware Support | 3 | 06-18-2003 07:46 PM |