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 11-18-2010, 10:45 PM
Fuzzy's Avatar
Fuzzy Fuzzy is offline
SageTVaholic
 
Join Date: Sep 2005
Location: Jurupa Valley, CA
Posts: 9,957
API call for altering EPG data

Is there an API call for manipulating EPG data? The only call close would be SetMediaFileMetadata, which WILL alter the Airing and Show objects, but I'm not sure if it'll work until a show is recorded., thus creating a MediaFile object. I'd like ot be able to alter the EPG data to correct for inconsistancies when I can detect them (primary example being inconsistant detection of 1st runs for NFL Total Access). I have seen nothing in the Airing API that would allow manipulation of EPG data prior to scheduling.

I'm thinking I could set up some 'rules' that would be run from the EPGUpdateCompleted event, to parse thorugh the guide and make my fixes. Any ideas?
__________________
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 11-19-2010, 12:21 AM
JREkiwi's Avatar
JREkiwi JREkiwi is offline
Sage Icon
 
Join Date: Jan 2005
Location: Auckland, New Zealand
Posts: 2,132
Last time I had a play with doing something like this, I found that any of my EPG changes got overwritten on the next EPG update. I think I was using AddShow() for it

John
Reply With Quote
  #3  
Old 11-19-2010, 06:57 AM
stuckless's Avatar
stuckless stuckless is offline
SageTVaholic
 
Join Date: Oct 2007
Location: London, Ontario, Canada
Posts: 9,713
I don't know any direct apis to edit the EPG data, but it would be handy. I do know that you can have an epg (epg_import_plugin, ie, xmltv uses this i think) but I think it replaces the SageTV EPG and doesnt augment it. What I don't know, is if it has the ability to interect with the existing epg data at a level that is not possible with the standard api. if it does, then you may be able to create some sort of faux epg import plugin that updates the NFL data.
Reply With Quote
  #4  
Old 11-19-2010, 09:25 AM
Fuzzy's Avatar
Fuzzy Fuzzy is offline
SageTVaholic
 
Join Date: Sep 2005
Location: Jurupa Valley, CA
Posts: 9,957
Quote:
Originally Posted by JREkiwi View Post
Last time I had a play with doing something like this, I found that any of my EPG changes got overwritten on the next EPG update. I think I was using AddShow() for it

John
Well, that would be enough - if my updates were triggered by the EPG updated event, than it should catch it each time it gets re-overwritten. I'll have to do some tests and see how it works out.
__________________
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
  #5  
Old 11-19-2010, 10:51 AM
Slugger Slugger is offline
SageTVaholic
 
Join Date: Mar 2007
Location: Kingston, ON
Posts: 4,008
If the Sage API provided methods like AiringAPI.SetIsHD(boolean), ShowAPI.SetIsFirstRun(boolean), etc. then you could correct minor errors with the data. For example, Hell's Kitchen on Fox is never marked with the HD flag, at least for the Fox HD affiliates on my lineup (Spokane, WA and Rochester, NY). So Sage always ends up recording an SD airing of the program instead of an HD one when it could unless I remember to override via manual recording, which I forget to do most weeks. If I could write a simple script to update the IsHD flag for those airings on those Fox channels then I'd be a happy camper.

I've reported this to Sage who's passed it on to Z2I and it has yet to be fixed (3 years now). I've also directly contacted Z2I numerous times with no results. Now I just want the AiringAPI.SetIsHD(boolean) API call so I can do Z2I's work for them.

As for changing actual program listings. I've experimented with this in the past (v6 only) and it does work. You create a Show object and then Airings for that show and it gets put into the EPG. There are two problems:

1) Your edits always get overwritten on the next EPG update; however, you can now detect when that will happen with the event system in v7 and then just rerun your edits.

2) If the programs you're inserting into the EPG don't fall in the same time slots as the ones already there then Sage removes all the surrounding programs from the EPG to allow your edits to fit in the schedule so you really have to be careful about what you're inserting into the EPG. I used to do this when I was on cable because the EPG data for the sports packages was just generic nothingness. So I'd parse a pdf from the cable co's web site and then inject the game schedules into Sage's EPG. Since I was just overwriting nonsense anyway I was ok, but if you were overwriting a channel that contained some legit listings then you'd want to be extra careful with what you were doing.
__________________
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
  #6  
Old 11-19-2010, 05:56 PM
Fuzzy's Avatar
Fuzzy Fuzzy is offline
SageTVaholic
 
Join Date: Sep 2005
Location: Jurupa Valley, CA
Posts: 9,957
Yeah, it looks like creating new show/airing combos will have to be the way to go forward. For me, the only thing I'll be correcting would be 1st run and episode title, everything else would be cloned from the existing airing I'm replacing, so it shouldn't nuke anything around it.

For instance, with NFL Total Access, it's a new show every day at 4pm pst. It then repeats 4 times before the next 4 pm airing. Basically, I just need to give it unique descriptions for each 'day (4pm one day, to 3:59 the next)', mark the 4pm one as 1st run, and it should work. Currently, though, Wed and Thurs are usually detected as repeat airings, because they have plain-standard descriptions. The only reason Mon, Tues and Fri get recorded at all, is they throw the week numbers in the description, so sage detects them as unique.

This type of plugin would work okay for news programs as well. Something to make each day's show unique from the previous day.
__________________
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
API call to convert show title to file name? Slugger SageTV Studio 5 06-03-2009 02:42 PM
Sort() API call sorts core's internal lists in place? Slugger SageTV Studio 1 02-09-2009 01:30 PM
Using Keystroke API call...how do you send non-printable chars? beelzerob SageTV Studio 23 03-02-2008 10:41 PM
Having trouble handling what an api call returns... beelzerob SageTV Studio 2 05-31-2006 07:45 PM


All times are GMT -6. The time now is 02:24 AM.


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