SageTV Community  

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

Notices

SageTV v7 Customizations This forums is for discussing and sharing user-created modifications for the SageTV version 7 application created by using the SageTV Studio or through the use of external plugins. Use this forum to discuss plugins for SageTV version 7 and newer.

Reply
 
Thread Tools Search this Thread Display Modes
  #221  
Old 06-03-2015, 07:55 PM
skiingwiz skiingwiz is offline
Sage Aficionado
 
Join Date: Jan 2005
Posts: 366
Quote:
Originally Posted by Slugger View Post
The easiest and most standard way is to require a specific, standard user agent header in the requests. Google Appengine doesn't allow spoofing of this header and so that knocks out a lot of contenders. The ones that remain seem to employ similar tactics as Donald Duck's site.
I know you've solved this for now, but I'm curious. Have you considered moving off of appengine to some other platform that would allow user agent spoofing? I know that if you tell Donald's Site that you are IE 8, it gives you a nice static HTML scoreboard.
Reply With Quote
  #222  
Old 06-03-2015, 08:46 PM
Slugger Slugger is offline
SageTVaholic
 
Join Date: Mar 2007
Location: Kingston, ON
Posts: 4,008
Quote:
Originally Posted by skiingwiz View Post
I know you've solved this for now, but I'm curious. Have you considered moving off of appengine to some other platform that would allow user agent spoofing? I know that if you tell Donald's Site that you are IE 8, it gives you a nice static HTML scoreboard.
When one of the big 4 breaks and there's no other options then a move off of appengine might be considered. To do that, I'd have to basically rewrite the server app (the source I inherited a few years back is vendor locked into Appengine's APIs for things like data storage).

But most importantly, appengine is free. Small enough user base that we've never exceeded appengine's daily free quotas (with room still for substantial growth, were that ever to happen). I've thought about just biting the bullet, rewriting it and moving it to AWS on a few occasions over the years, but it's tough to beat free especially when the service doesn't generate any revenue nor do I have any such plans to start trying to.

But if user-agent spoofing were the only way to get data at some point in the future then I might consider it (but then are people willing to pay a nominal fee to offset an average AWS bill, for example?). Hopefully we don't have to worry about that for some time to come.
__________________
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
  #223  
Old 06-04-2015, 07:29 PM
skiingwiz skiingwiz is offline
Sage Aficionado
 
Join Date: Jan 2005
Posts: 366
Quote:
Originally Posted by Slugger View Post
But if user-agent spoofing were the only way to get data at some point in the future then I might consider it (but then are people willing to pay a nominal fee to offset an average AWS bill, for example?). Hopefully we don't have to worry about that for some time to come.
I'd be willing to put up a few bucks for the service. But, like you say, hopefully that doesn't happen. It's hard to argue with free.
Reply With Quote
  #224  
Old 06-12-2015, 12:36 PM
Slugger Slugger is offline
SageTVaholic
 
Join Date: Mar 2007
Location: Kingston, ON
Posts: 4,008
Grrrr... this is starting to turn into more of a chore than I'd prefer. Suddenly out of the blue, mlb.com has started blocking all requests from appengine.

I've moved mlb over to the same source as nba, but this also means we now lose future look aheads for the schedule (i.e. only current day's games are available).

I could see why these sites were blocking me if I were hitting them every 2 seconds, but I don't. I actually hit the sites once every 2 mins and cache the result in the app for 2 mins and only while there are active requests for the status of the game. When there are no games in progress, I do not hit the urls. If you load MLB's scoreboard page and just leave it sitting in your browser all day, your browser makes the same ajax request I make, except it makes it much, much more frequently than this app does.

I'm now down to one source for everything. If it starts blocking appengine then we're screwed. Fingers crossed...
__________________
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
  #225  
Old 06-13-2015, 07:08 PM
skiingwiz skiingwiz is offline
Sage Aficionado
 
Join Date: Jan 2005
Posts: 366
Could pulling the data from the various sources be crowd-sourced? I'm thinking of a small client that asks livepvrdata.com what url it needs, pulls the data, and then sends it back to livepvrdata.com.

It wouldn't take very many of these little clients to make it much more difficult for the sites to block, since they'll be coming from all over the internet.

I know I'd be willing to run such a client. I'd even be willing to write a client or a sageplugin to do it. (Of course, that's not much work. There would still be a chunk of work to do on the backend to support this.)
Reply With Quote
  #226  
Old 06-13-2015, 08:47 PM
KarylFStein KarylFStein is offline
Sage Fanatic
 
Join Date: Apr 2006
Location: Westland, Michigan, USA
Posts: 999
What about a proxy? If the filtering is really just the user agent some PHP code on a web host could be a solution.
__________________
Home Network: https://karylstein.com/technology.html
Reply With Quote
  #227  
Old 06-13-2015, 08:55 PM
KryptoNyte's Avatar
KryptoNyte KryptoNyte is offline
SageTVaholic
 
Join Date: Dec 2006
Posts: 2,754
Any time there is a live sporting event on the EPG, I just head for Google and type in the name of one team followed by a "vs" and it gives the status of the event. What feeds that and/or could something be grabbed right from that search result?
Attached Images
File Type: jpg g-search.jpg (145.3 KB, 193 views)
Reply With Quote
  #228  
Old 06-14-2015, 10:40 PM
Slugger Slugger is offline
SageTVaholic
 
Join Date: Mar 2007
Location: Kingston, ON
Posts: 4,008
Quote:
Originally Posted by skiingwiz View Post
Could pulling the data from the various sources be crowd-sourced? I'm thinking of a small client that asks livepvrdata.com what url it needs, pulls the data, and then sends it back to livepvrdata.com.

It wouldn't take very many of these little clients to make it much more difficult for the sites to block, since they'll be coming from all over the internet.

I know I'd be willing to run such a client. I'd even be willing to write a client or a sageplugin to do it. (Of course, that's not much work. There would still be a chunk of work to do on the backend to support this.)
An interesting idea, but then the service is reliant on users being online. Is your Sage server on 24x7 or do you put it to sleep between recordings? Mine is 24x7, but are enough people's to make it viable? The other issue is that each of these clients now polls the web service constantly looking for work to do, which greatly increases the number of requests per day, which starts to push us closer to exhausting the service's free quota. I'd have to work out the numbers, but I actually expect this kind of thing would easily make us exceed the free quota (because clients have to poll all the time, 24x7, because you never know when there's work to be done).

Quote:
Originally Posted by KarylFStein View Post
What about a proxy? If the filtering is really just the user agent some PHP code on a web host could be a solution.
Yeah, this I've thought about, but 1) it's not free. I realize your run of the mill php hosting site is dirt cheap so I'd probably be willing to eat the buck or two a month for it except 2) you get what you pay for. $1/mth hosts are just that. You're not getting much of an SLA (if any) for $1/mth. So we now have a single point of failure that is very hard to overcome when something goes wrong (i.e. I change the web service to route all requests thru this proxy and if the proxy goes belly up then the service is dead). At least today, when a site blocks appengine only that one monitor is affected, the others continue to work. And 3) the architecture of this web service just got a whole lot more complicated (IOW, it requires a decent chunk of the app to be modified/rewritten).

Quote:
Originally Posted by KryptoNyte View Post
Any time there is a live sporting event on the EPG, I just head for Google and type in the name of one team followed by a "vs" and it gives the status of the event. What feeds that and/or could something be grabbed right from that search result?
Yeah, I've seen this, but I have no idea where Google is getting its data from -- my guess is they pay for it from somewhere. I just spent a quick 10 mins looking at the html. There seems to be some patterns in there meaning it might be possible to scrape, but the html is so cryptic it would take awhile to properly write & test something. Though push comes to shove, it might be something to start looking into as an alternative.

However, good news!! I decided to revisit appengine's api docs just to see if there was something I could do and it seems sometime between now and let's say the last 3 or 4 years they've modified their http client api to allow modification of the user-agent header. The only caveat is that they still append an appengine identifier onto any custom value you set it to, but it seems to be good enough to fool MLB's site. So I've starting sending an IE8 user agent string on all requests from the app and even though appengine mangles it to append its stuff to the end of the string, mlb still seems to think it's IE8 as the requests aren't blocked anymore. A few other web sites I tested with were convinced I was still IE8 as well. I need to try it with Donald Duck's site still as well to see if they're also convinced, but that will have to wait for another weekend. But it seems there's some light once again at the end of the tunnel, they're just making me work for it these days after (literally) years of next to no work on this thing.
__________________
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
  #229  
Old 06-16-2015, 01:45 PM
skiingwiz skiingwiz is offline
Sage Aficionado
 
Join Date: Jan 2005
Posts: 366
Quote:
Originally Posted by Slugger View Post
The other issue is that each of these clients now polls the web service constantly looking for work to do, which greatly increases the number of requests per day, which starts to push us closer to exhausting the service's free quota. I'd have to work out the numbers, but I actually expect this kind of thing would easily make us exceed the free quota (because clients have to poll all the time, 24x7, because you never know when there's work to be done).
Good point. I had not considered the effect of my idea on the server quota. That pretty much negates the idea.

Quote:
Originally Posted by Slugger View Post
However, good news!! I decided to revisit appengine's api docs just to see if there was something I could do and it seems sometime between now and let's say the last 3 or 4 years they've modified their http client api to allow modification of the user-agent header. The only caveat is that they still append an appengine identifier onto any custom value you set it to, but it seems to be good enough to fool MLB's site. So I've starting sending an IE8 user agent string on all requests from the app and even though appengine mangles it to append its stuff to the end of the string, mlb still seems to think it's IE8 as the requests aren't blocked anymore. A few other web sites I tested with were convinced I was still IE8 as well. I need to try it with Donald Duck's site still as well to see if they're also convinced, but that will have to wait for another weekend. But it seems there's some light once again at the end of the tunnel, they're just making me work for it these days after (literally) years of next to no work on this thing.
Awesome.
Reply With Quote
  #230  
Old 06-16-2015, 08:44 PM
Slugger Slugger is offline
SageTVaholic
 
Join Date: Mar 2007
Location: Kingston, ON
Posts: 4,008
Well my one Canadian site seems to be happy to serve me data again from appengine since I now claim to be IE8. Our friends at MLB are also serving up data again. We're now fully diversified among three different sites again.

I still need to rework some of Donald's html pages to regain full schedule look ahead capabilities for some sports but since those sports are about to end, I'll deal with that later this summer or early fall. After a bit of a scare, I'd say we're back to full functionality at least thru the summer.
__________________
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
  #231  
Old 07-06-2015, 02:06 PM
jvonbokel jvonbokel is offline
Sage User
 
Join Date: Jan 2004
Location: St. Louis, MO
Posts: 13
Quote:
Originally Posted by Slugger View Post
An interesting idea, but then the service is reliant on users being online. Is your Sage server on 24x7 or do you put it to sleep between recordings? Mine is 24x7, but are enough people's to make it viable? The other issue is that each of these clients now polls the web service constantly looking for work to do, which greatly increases the number of requests per day, which starts to push us closer to exhausting the service's free quota. I'd have to work out the numbers, but I actually expect this kind of thing would easily make us exceed the free quota (because clients have to poll all the time, 24x7, because you never know when there's work to be done).
This may be a moot point now that you've had success spoofing IE8, but the traffic could be limited by having the server tell each client when to connect again. If there are no active games, the response would say to wait until the next game starts. Also, the server could effectively manage the number of clients by telling some to "sleep" for a day or two when it gets too many active clients. You'd have to decide how many is a safe number to rely on (2? 5? 10?), but that could be ironed out over time as well.

On an unrelated note, I've got two MLB games scheduled tomorrow (Cardinals @ Cubs double header), and I'm getting a "Monitor status is invalid" message on them. Is there an easy way to correct that on my end, or is that just a limitation of SRE that I have to live with? If so I'm prepared to do that, as a success rate of 160 out of 162 is very acceptable.
Reply With Quote
  #232  
Old 07-06-2015, 06:17 PM
Slugger Slugger is offline
SageTVaholic
 
Join Date: Mar 2007
Location: Kingston, ON
Posts: 4,008
Quote:
Originally Posted by jvonbokel View Post
On an unrelated note, I've got two MLB games scheduled tomorrow (Cardinals @ Cubs double header), and I'm getting a "Monitor status is invalid" message on them. Is there an easy way to correct that on my end, or is that just a limitation of SRE that I have to live with? If so I'm prepared to do that, as a success rate of 160 out of 162 is very acceptable.
So my once Sage box turned desktop/dev box finally called it quits last week - motherboard died. 6.5 years of 24x7 power on then another good 1.5 years as my desktop, it doesn't owe me anything I suppose. Unfortunately, my Appengine dev env for all things livepvrdata.com/SRE was on the box. I got the source code else where, but no way to debug/redeploy it (until I take the time to rebuild the env else where and as long as sitting on my deck bbq'ing is an option, rebuilding dev envs isn't ). So if it's broken, it's not going to get fixed any time soon, but I fixed doubleheader support for MLB a few weeks back when the Jays played one of their very rare DHs and I noticed that DH support was broken.

The key to DH monitors working correctly is the time the recording starts. When the same teams play multiple games on the same day, I try to figure out which game to attach to the recording based on the time the recording starts and try to match it to the proper game based on the start time in the data feed. I know it worked for the Jays DH so it should still work. Status unknown happens (quite frequently for MLB) as the data feed I use seems to go wonky more often than it probably should. If it was wonky during SRE's daily checkup on your system then you get status unknown. In that case, the games will just monitor properly tomorrow. Anyway, let me know if it does or doesn't work because if it is a problem with DH support then I'd like to try and fix it sometime in the relatively near future.
__________________
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
  #233  
Old 08-14-2015, 02:22 AM
Denali Denali is offline
Sage Advanced User
 
Join Date: Aug 2008
Location: South Florida
Posts: 169
Adding an FYI. SRE fails under SAGE.JAR version 9. Appears to be a CORE dependency that coded for 7.1.9.256.
__________________
HTPC: Gigabyte GA-Z170XP-SLI, I7-6700, 16GB, Windows 10 Pro x64, Hauppauge HVR-1600, WinTV-dualHD, Colossus 2, Samsung 850 EVO 120GB, Seagate 3TB, WD 3TB, 3TB, 5TB, Java v1.8.0_231, SageTVx64 v9.2.1.826, Samsung UN60EH6003F, Dish ViP222K, ViewHD 1x2 HDMI Splitter.
Reply With Quote
  #234  
Old 08-14-2015, 04:27 PM
egeller egeller is offline
Sage Aficionado
 
Join Date: Feb 2006
Location: Drexel Hill, PA
Posts: 334
Quote:
Originally Posted by Denali View Post
Adding an FYI. SRE fails under SAGE.JAR version 9. Appears to be a CORE dependency that coded for 7.1.9.256.
I am seeing this too, and I think the assessment is correct.

Is there a hack we can do ourselves to re-enable the plug-in or do we need to wait for it to be updated? Just wondering.
__________________
Server:UnRaid;2x Intel Xeon E5; SuperMicro moboard;Also:BM3000 w/ WMC; 2x Ceton ETH 6; OpenDCT
SageTV Extender:3x HD200 1x HD300 1xFireTV
Sage TV: 9.2 on Java 11, Standard STVi, Comskip Playback, Web Interface, 24 Hour Clock, SRE, Playon
All in lovely Drexel Hill, PA
Reply With Quote
  #235  
Old 08-14-2015, 06:00 PM
wayner wayner is offline
SageTVaholic
 
Join Date: Jan 2008
Location: Toronto, ON
Posts: 7,491
Quote:
Originally Posted by egeller View Post
I am seeing this too, and I think the assessment is correct.

Is there a hack we can do ourselves to re-enable the plug-in or do we need to wait for it to be updated? Just wondering.
Give Slugger a break, we have short summers here in Canada and he is enjoying it. Plus the Blue Jays are the hottest team in baseball and are in contention for the first time in a generation.
__________________
New Server - Sage9 on unRAID 2xHD-PVR, HDHR for OTA
Old Server - Sage7 on Win7Pro-i660CPU with 4.6TB, HD-PVR, HDHR OTA, HVR-1850 OTA
Clients - 2xHD-300, 8xHD-200 Extenders, Client+2xPlaceshifter and a WHS which acts as a backup Sage server

Last edited by wayner; 08-14-2015 at 10:01 PM.
Reply With Quote
  #236  
Old 08-14-2015, 06:44 PM
skiingwiz skiingwiz is offline
Sage Aficionado
 
Join Date: Jan 2005
Posts: 366
Quote:
Originally Posted by egeller View Post
Is there a hack we can do ourselves to re-enable the plug-in or do we need to wait for it to be updated? Just wondering.
Yes. Assuming SRE will work fine in Sage v9...

Put the attached file in your SageTV/SageTV folder (in the same folder as the SageTVPlugins.xml file) and remove the .txt extension. This will override the SRE plugin manifest to remove the max version dependency.

Note 1: I have not tested this, but the concept will work (this is how devs test plugins without having to submit them.

Note 2: If you already have a SageTVPluginsDev.xml file, don't overwrite it... but if you have one already, I'll pretty much assume you know what you're doing with it.

I think I'm still able to submit updates to this plugin, so once I find time to get the Open Source Sage running, I'll verify this will work with it and release a proper update.
Attached Files
File Type: txt SageTVPluginsDev.xml.txt (3.3 KB, 144 views)
Reply With Quote
  #237  
Old 08-15-2015, 01:32 PM
skiingwiz skiingwiz is offline
Sage Aficionado
 
Join Date: Jan 2005
Posts: 366
I can now confirm now that using the method above will allow SRE to be installed using Sage 9. Since I was running this on a test install, I don't actually have any recordings to test functionality.
Reply With Quote
  #238  
Old 08-15-2015, 06:21 PM
Slugger Slugger is offline
SageTVaholic
 
Join Date: Mar 2007
Location: Kingston, ON
Posts: 4,008
I can't think of a reason why I set a max version for this plugin. The hack proposed here should be fine until someone actually updates the manifest. The earliest I would update the plugin myself would be mid October, but I don't even think I have ownership of this plugin in the repo anymore so it may not even be up to me to fix it. Either way I'm enjoying summer and have no env to even address these kinds of issues until I rebuild it and that won't start before October.
__________________
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
  #239  
Old 08-15-2015, 07:06 PM
Fuzzy's Avatar
Fuzzy Fuzzy is offline
SageTVaholic
 
Join Date: Sep 2005
Location: Jurupa Valley, CA
Posts: 9,957
message andy, he might be able to alter the manifest to simply remove the max version dependency.
__________________
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
  #240  
Old 08-15-2015, 07:51 PM
skiingwiz skiingwiz is offline
Sage Aficionado
 
Join Date: Jan 2005
Posts: 366
Since I technically control the plugin, I just submitted an updated manifest. It should show up in a few minutes. It points to the same release, just removes the max version constraint.

Slugger, feel free to take control of this back whenever you want it
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
Plugin: Sage Recording Extender (SREv3) Slugger SageTV v7 Customizations 504 12-18-2011 08:01 PM
Sage Recording Extender (SRE) UI tmiranda Customization Announcements 0 09-09-2010 04:26 PM
Plugin: Sage Recording Extender (SRE) Slugger SageTV Customizations 428 06-19-2010 11:03 AM
Sage Recording Extender (SRE) new release notifications Slugger Customization Announcements 8 03-28-2010 07:56 AM
IMDB Plugin for Extender tonysathre SageTV Customizations 6 08-20-2008 09:15 PM


All times are GMT -6. The time now is 01:22 PM.


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