SageTV Community  

Go Back   SageTV Community > SageTV Development and Customizations > SageTV Studio
Forum Rules FAQs Community Downloads Today's Posts Search

Notices

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.

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 04-14-2011, 04:02 PM
evilpenguin's Avatar
evilpenguin evilpenguin is offline
SageTVaholic
 
Join Date: Aug 2003
Location: Seattle, WA
Posts: 3,696
Easier way to get from MediaFile or Airing to SeriesInfo?

Right now the only way (I know of) to get from a MediaFile to its associated SeriesInfo is to make a map of all series info then pull out the subgroup based on the GetMediaTitle().

How about GetSeriesInfo(MediaFile|Airing|String)?

Edit: And while i'm making requests, how about a few more along the same lines:

GetMediaFiles(SeriesInfoObject) - Get list of media files that share that SeriesInfo object
GetAllSeriesInfo(bool HasMediaFiles) - Get a list of SeriesInfo objects that have a non-zero count of media files
__________________
Clients: 1xHD200 Connected to 50" TH-50PZ750U Plasma
Server : Shuttle SFF SSH55J2 w/ Win7 Home, SageTV v7, Core i3 540, 2GB RAM, 30GB SSD for OS, 1.5TB+2x1TB WDGP for Recordings, BluRay, 2xHDHR, 1xFirewire
SageTV : PlayOn, SJQ, MediaShrink, Comskip, Jetty, Web Client, BMT


Having a problem? Don't forget to include a log! (Instructions for: PlayOn For SageTV v1.5, MediaShrink)

Last edited by evilpenguin; 04-14-2011 at 04:19 PM.
Reply With Quote
  #2  
Old 04-14-2011, 04:06 PM
Slugger Slugger is offline
SageTVaholic
 
Join Date: Mar 2007
Location: Kingston, ON
Posts: 4,008
I was actually looking at this just a few mins ago and came to the same conclusion. +1 for the new API call.
__________________
Twitter: @ddb_db
Server: Intel i5-4570 Quad Core, 16GB RAM, 1 x 128GB OS SSD (Win7 Pro x64 SP1), 1 x 2TB media drive
Capture: 2 x Colossus
STB Controller: 1 x USB-UIRT
Software:Java 1.7.0_71; SageTV 7.1.9
Clients: 1 x HD300, 2 x HD200, 1 x SageClient, 1 x PlaceShifter
Plugins: Too many to list now...
Reply With Quote
  #3  
Old 04-14-2011, 04:22 PM
Opus4's Avatar
Opus4 Opus4 is offline
Administrator
 
Join Date: Sep 2003
Location: NJ
Posts: 19,624
Have you tried GetShowSeriesInfo(MediaFile) and GetShowSeriesInfo(Airing)?

- 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.
Reply With Quote
  #4  
Old 04-14-2011, 04:27 PM
evilpenguin's Avatar
evilpenguin evilpenguin is offline
SageTVaholic
 
Join Date: Aug 2003
Location: Seattle, WA
Posts: 3,696
Yeah, but that only applies to recordings, i'm talking about any MediaFile.
__________________
Clients: 1xHD200 Connected to 50" TH-50PZ750U Plasma
Server : Shuttle SFF SSH55J2 w/ Win7 Home, SageTV v7, Core i3 540, 2GB RAM, 30GB SSD for OS, 1.5TB+2x1TB WDGP for Recordings, BluRay, 2xHDHR, 1xFirewire
SageTV : PlayOn, SJQ, MediaShrink, Comskip, Jetty, Web Client, BMT


Having a problem? Don't forget to include a log! (Instructions for: PlayOn For SageTV v1.5, MediaShrink)
Reply With Quote
  #5  
Old 04-14-2011, 05:49 PM
PLUCKYHD PLUCKYHD is offline
SageTVaholic
 
Join Date: Dec 2007
Posts: 6,257
Quote:
Originally Posted by evilpenguin View Post
Yeah, but that only applies to recordings, i'm talking about any MediaFile.
The Map method we use in diamond is best. I don't think they can do what you are asking as I think technically they are only suppose to allow guide data for recorded shows. Just guessing on their user agreement.
Reply With Quote
  #6  
Old 04-14-2011, 05:50 PM
stuckless's Avatar
stuckless stuckless is offline
SageTVaholic
 
Join Date: Oct 2007
Location: London, Ontario, Canada
Posts: 9,713
Quote:
Originally Posted by evilpenguin View Post
Yeah, but that only applies to recordings, i'm talking about any MediaFile.
I guess technically, only recordings (or Airings) will have a SeriesInfo associated with it.

Phoenix does associate SeriesInfo with non recorded tv files as well.. so you could use...

Code:
SeriesInfo = SeriesInfoAPI.GetSeriesInfoForID(MediaFileAPI.GetMediaFileMetadata(MediaFile, "SeriesInfoID"));
EDIT: Phoenix also adds a SeriesInfo object for any TV series that does not exist.

Last edited by stuckless; 04-14-2011 at 05:54 PM.
Reply With Quote
  #7  
Old 04-14-2011, 06:15 PM
PLUCKYHD PLUCKYHD is offline
SageTVaholic
 
Join Date: Dec 2007
Posts: 6,257
Quote:
Originally Posted by stuckless View Post
I guess technically, only recordings (or Airings) will have a SeriesInfo associated with it.

Phoenix does associate SeriesInfo with non recorded tv files as well.. so you could use...

Code:
SeriesInfo = SeriesInfoAPI.GetSeriesInfoForID(MediaFileAPI.GetMediaFileMetadata(MediaFile, "SeriesInfoID"));
EDIT: Phoenix also adds a SeriesInfo object for any TV series that does not exist.
Without looking but are you grouping all the series objects and storing the titles as keys to do this? This is how we are doing it in diamond with great success just curious if you were doing it differently.
Reply With Quote
  #8  
Old 04-14-2011, 07:05 PM
stuckless's Avatar
stuckless stuckless is offline
SageTVaholic
 
Join Date: Oct 2007
Location: London, Ontario, Canada
Posts: 9,713
Quote:
Originally Posted by PLUCKYHD View Post
Without looking but are you grouping all the series objects and storing the titles as keys to do this? This is how we are doing it in diamond with great success just curious if you were doing it differently.
I'm just using the sage apis. SeriesInfoID is a core sagetv field that references the ID of the SeriesInfo Object. When Phoenix add a new SeriesInfo object for a non-recording, it will set that field to be SeriesInfoID... so the mediafile is joined by the seriesinfo id. I don't have any maps or stuff... although I do loop through the series info objects to find an existing series info for a non-recording...but once it is found, I just set that field.
Reply With Quote
  #9  
Old 04-14-2011, 07:09 PM
PLUCKYHD PLUCKYHD is offline
SageTVaholic
 
Join Date: Dec 2007
Posts: 6,257
Quote:
Originally Posted by stuckless View Post
I'm just using the sage apis. SeriesInfoID is a core sagetv field that references the ID of the SeriesInfo Object. When Phoenix add a new SeriesInfo object for a non-recording, it will set that field to be SeriesInfoID... so the mediafile is joined by the seriesinfo id. I don't have any maps or stuff... although I do loop through the series info objects to find an existing series info for a non-recording...but once it is found, I just set that field.
Ahh I didn't resize you had already implemented that.
Reply With Quote
  #10  
Old 04-20-2011, 04:33 PM
Narflex's Avatar
Narflex Narflex is offline
Sage
 
Join Date: Feb 2003
Location: Redondo Beach, CA
Posts: 6,349
The way the core links to SeriesInfo is through the 'external ID' (i.e. SH/EPXXXXX) and not by title. This is because you can't uniquely identify a SeriesInfo object based on title. Just execute these two statements and you'll see why:

Size(GetAllSeriesInfo()) returns 5331
Size(GroupByMethod(GetAllSeriesInfo(), "GetSeriesTitle")) returns 5132

So you lose 199 of them if you index them by title. Now I'm curious which ones those are....(I love the expression evaluator in Studio). It's possible this is due to me having extra crap in my development system database...but I also tried this on a 'cleaner' system and found similar results. These may be due to errors on Tribune's end since we never actually clean out the SeriesInfo table. (and I did look at which ones it was and it was just a bunch of random ones)

So since we can't actually ensure that SeriesInfo objects are unique by title; don't expect us to add API calls based around that.

But the other 2 proposed by the OP can easily be done with a GroupByMethod() call along with a couple other operations.
__________________
Jeffrey Kardatzke
Google
Founder of SageTV
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 MediaFile Listener jphipps SageTV Studio 4 06-17-2009 08:02 PM
Test if MediaFile exists dflachbart SageTV Studio 9 05-23-2006 01:24 PM
Is MediaFile Required? aperry SageTV Studio 8 04-18-2006 03:05 PM


All times are GMT -6. The time now is 12:57 PM.


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