SageTV Community  

Go Back   SageTV Community > SageTV Development and Customizations > SageTV Github Development

Notices

SageTV Github Development Discussion related to SageTV Open Source Development. Use this forum for development topics about the Open Source versions of SageTV, hosted on Github.

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 08-30-2015, 09:42 AM
Slugger Slugger is offline
SageTVaholic
 
Join Date: Mar 2007
Location: Kingston, ON
Posts: 4,008
Can't configure inputs with EPG plugin

Andy's been working on getting the Schedules Direct plugin to work with OSS version. He got me the code changes, I managed to build it, and just as a final sanity check before submitting it to the repo I created a vm for v9 and tried to setup some inputs using the plugin. This is on linux with no server key installed (i.e. a new OSS user with no license keys available to her).

All looks good until you select the lineup to attach to the input. The next step is it tries to download the lineup from the epg server, but instead of using the configured epg plugin, it always tries to use the Sage epg server, which halts the whole operation as it immediately dies "You do not have a SageTV license, you cannot download EPG data."

I've spent more than my allotment of summer time coding looking at this over the last couple hours and I've traced it down to this:

CaptureDeviceInputAPI.java:454

Seems when configuring a new input, we end up in this else block because there is no "custom_data_source_class" defined and the first thing that else block does is create a new WarlockRipper (i.e. head straight to the Sage epg server), which then immediately bails since there is no sage license defined.

So what is an EPGDataSource and what is its role? It appears that epg plugins must provide a custom one along side the epg plugin implementation? This EPGDataSource is new to Sage 9 (as far as I can tell). I certainly didn't have to provide any such custom class for the v7 version of the plugin.

A quick peek thru EPGDataSource suggested I could probably just fake one of these things to bypass the WarlockRipper instantiation, but I figured it was best to wait for Jeff's explanation (and I really don't want to code all day to test my theory ).

Good news out of this though is I now have a Sage v9 vm setup, but just not quite ready to dive into OSS projects too heavily yet.

Bad news: This EPGDataSource thing seems to suggest that all v7 (and older) epg plugins are broken in v9 (at least when the user has no server license available). Please correct me if my statement is wrong.

Andy, Jeff's answers to my findings are probably going to create a whole bunch more work for you to get this plugin working in Sage 9. If a custom EPGDataSource can just safely return hardcoded values for the public methods then it may not be too bad, but if these things have actual meaning and need to return values based on "stuff" then, well, there's some work to be done.
__________________
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
  #2  
Old 08-30-2015, 10:37 AM
Fuzzy's Avatar
Fuzzy Fuzzy is offline
SageTVaholic
 
Join Date: Sep 2005
Location: Jurupa Valley, CA
Posts: 9,957
Weren't you originally using some workarounds in the v7 version that were 'patched' in v9, causing this issue to begin with? I think part of that 'fixing' was changing all datasources to be a similarly built class. That's sort of what this is doing, it uses the datasource class, or if there isn't one configured, it else's into using the 'default' warlaockripper.
I honestly had thought building a class to wrap around the schedules direct was primarily what was being done.
__________________
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
  #3  
Old 08-30-2015, 11:14 AM
Slugger Slugger is offline
SageTVaholic
 
Join Date: Mar 2007
Location: Kingston, ON
Posts: 4,008
My original workaround simply dealt with the fact that the EPGDBPublic2 interface was incorrectly obfuscated in the 7.1.9 Sage.jar. That interface provided the ability for epg plugins to do things like set the new (at the time) live flag and other epg additions added by that interface. Turns out the code changes required to the plugin to handle this were minimal -- I planned for this day to come (where the class would no longer be obfuscated, not necessarily an OSS release per se) and my plan worked exceedingly well. So undoing my wrapper and referring directly to the Sage interface was super easy; delete my wrapper from the project and change 2 or 3 lines of code to use the Sage interface instead of my wrapper class and then change constant references from my wrapper to the equivalent in the EPGDBPublic2 interface, that's it. But with those changes built, that lead to this EPGDataSource issue.

The EPGDataSource class is completely new to v9 (as far as I can tell). CaptureDeviceInputAPI makes reference to this new custom_data_source_class property from Sage.props, which doesn't seem to exist in v7 (at least not in my v7 props file). If this class isn't new then v7 did a much better job of dealing with it on behalf of epg plugin implementations. I'm pretty sure it's new and I'm pretty sure epg plugins will have to provide a custom implementation of this class along side their epg plugin class, but I'll wait for Jeff to confirm -- no desire to spend a day experimenting on Sage 9 stuff yet.
__________________
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...

Last edited by Slugger; 08-30-2015 at 11:19 AM.
Reply With Quote
  #4  
Old 08-30-2015, 11:48 AM
Fuzzy's Avatar
Fuzzy Fuzzy is offline
SageTVaholic
 
Join Date: Sep 2005
Location: Jurupa Valley, CA
Posts: 9,957
I'm just glossing through it for the first time, but I think this EPGDataSource class is in lieu of the old EPGPlugin interface. It looks like everything is done in the datasource, and the EPGPlugin is instead called by warlockRipper to add/modify data in between warlock and the database. I don't think you'd need both, a SchedDirectDataSource class implementing ETGDataSource should be able to handle all of the SchedulesDirect duties (if I'm understanding it's implementation properly).
__________________
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 08-31-2015, 12:46 PM
Narflex's Avatar
Narflex Narflex is offline
Sage
 
Join Date: Feb 2003
Location: Redondo Beach, CA
Posts: 6,313
EPGDataSource has always been there...the stuff you see in the code about the custom class is new and is there for testing that I do sometimes with an alternate EPG server.

I submitted a patch to GitHub this morning that fixes the problem with the EPGPlugin class not getting invoked if there was no SageTV license. Just an oversight on my part when i added that code...trivial fix.
__________________
Jeffrey Kardatzke
Google
Founder of SageTV
Reply With Quote
  #6  
Old 08-31-2015, 05:01 PM
Slugger Slugger is offline
SageTVaholic
 
Join Date: Mar 2007
Location: Kingston, ON
Posts: 4,008
The patch seems to work fine. With it, I'm able to configure the inputs and load the epg via the plugin.

I'll package up the plugin and get a v9 version into the repo when I have time this week (most likely this weekend-ish).
__________________
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
  #7  
Old 08-31-2015, 07:34 PM
tmiranda's Avatar
tmiranda tmiranda is offline
SageTVaholic
 
Join Date: Jul 2005
Location: Central Florida, USA
Posts: 5,842
Quote:
Originally Posted by Slugger View Post
The patch seems to work fine. With it, I'm able to configure the inputs and load the epg via the plugin.

I'll package up the plugin and get a v9 version into the repo when I have time this week (most likely this weekend-ish).
Thanks Slugger. This is going to make a lot of people happy
__________________

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.
Reply With Quote
  #8  
Old 09-02-2015, 08:38 PM
Slugger Slugger is offline
SageTVaholic
 
Join Date: Mar 2007
Location: Kingston, ON
Posts: 4,008
Finding some long standing bugs that are much easier to track down when you can mod the core to dump full stack traces.

Good news, I'm going to fix them... bad news, this is going to delay the release by an unknown amount of time. All the bugs I'm hitting are with a fresh install with unconfigured inputs, which is how the typical OSS user is going to try to setup this plugin so I figure I'll save myself the Q&A session and fix what I can ahead of time.

ETA: unknown, but if not by Friday morning then probably not until the following weekend (long weekend this week so won't be around).

Edit: I found the underlying bug causing all the other weirdness and fixed it! A release will be made before I leave for the weekend. See the other thread for more details.
__________________
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...

Last edited by Slugger; 09-02-2015 at 10:16 PM. Reason: It's working!!
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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
using RCA inputs go_slow Hardware Support 1 07-13-2010 09:23 AM
Plugin Manager: Configure plugin medwynd SageTV Beta Test Software 0 05-29-2010 08:43 AM
hvr-1800 3 inputs? SageGk Hardware Support 2 09-28-2008 08:43 PM
VGA inputs on HDTVs bmcraig Hardware Support 12 01-06-2007 05:39 AM
PVR-500 with two STB: Inputs? JUC Hardware Support 3 02-07-2006 10:18 AM


All times are GMT -6. The time now is 05:25 AM.


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