FAQ  •  Register  •  Login

DYNAMIC SPORTS STREAMS LIBRARY

<<

jhb50

DLNA master

Posts: 2854

Joined: Thu Jun 30, 2011 9:32 pm

Post Sun Apr 01, 2012 12:41 am

DYNAMIC SPORTS STREAMS LIBRARY

HAHASPORT.COM is an aggregator site which maintains a dynamic list of upcoming sports events, and provides links to currently live event player streams. Consider it a Library of Sports events.

The attached HAHASPORT.GROOVY provides access to this library of events, which due to its dynamic nature must be refreshed on demand.

The wiki entry http://wiki.serviio.org/doku.php?id=refresh_on_demand provides details on how to implement a Refresh on Demand menu item and the following instructions for use of the groovy:

To use the HAHASPORT.GROOVY just add the following Resource URL's as WebResources in the Serviio Console, together with the appropriate labels.

http://www.hahasport.com/c-1.html FOOTBALL
http://www.hahasport.com/c-3.html HOCKEY
http://www.hahasport.com/c-4.html TENNIS
http://www.hahasport.com/c-6.html BASKETBALL
http://www.hahasport.com/c-7.html BASEBALL
http://www.hahasport.com/c-8.html GOLF
http://www.hahasport.com/c-9.html CYCLING
http://www.hahasport.com/c-10.html MOTORSPORTS
http://www.hahasport.com/c-11.html OTHER

Since each event may have multiple streams available each from a different source, the estreams parameter may be used to cause multiple streams to be displayed for each event if available. estreams may equal 1 thru 9 with 9 signifing that all available streams should be displayed, for example http://www.hahasport.com/c-1.html?estreams=9

Note also that since HAHASPORT.COM sources its streams from many different sources that there may be streams the groovy does not decode for display in the Serviio menu. For details on the stream decoding set the onlinelibrary log to debug mode.

To access the current events for a given sport, open the menu and click on the Refresh menu item which will initiate a refresh of the online source while the Refresh Menu Item stream plays. Wait for at least a minute for the refresh to execute before stopping playback and the refreshed menu will be displayed on return and the desired item selected for playback. If playback of the Refresh Menu Item stream is stopped before the refresh is complete the menu will be unavailable on return and Serviio will exit and require a restart to access the updated menu once available.

Note that if you do not to implement changes required to support the Refresh On Demand menu item, you must use the Serviio console or a remote console to force the refresh of each sport in order to obtain the current live stream event menu.
Attachments
HaHaSport.groovy.V2.zip
Version 2 - Apr. 4,2012
(5.34 KiB) Downloaded 714 times
<<

jhb50

DLNA master

Posts: 2854

Joined: Thu Jun 30, 2011 9:32 pm

Post Wed Apr 04, 2012 5:15 pm

Re: DYNAMIC SPORTS STREAMS LIBRARY

The groovy has been updated to V2, which adds an automatic hourly refresh so that the on demand refreshes can complete more quickly.
<<

mhand

Streaming enthusiast

Posts: 34

Joined: Fri Jan 20, 2012 2:24 pm

Post Sat Apr 21, 2012 3:04 pm

Re: DYNAMIC SPORTS STREAMS LIBRARY

This is superb. Works a treat, thanks a lot for your work
<<

mhand

Streaming enthusiast

Posts: 34

Joined: Fri Jan 20, 2012 2:24 pm

Post Tue May 01, 2012 1:36 pm

Re: DYNAMIC SPORTS STREAMS LIBRARY

I was wondering if it would be possible to write a plug in to do the same for this site

http://www.firstrowsports.eu/

jhb50 - I tried copying your hahasports plug in and changed all the references to hahsports.com to firstrow sports.eu but it fails with the following. Guess it's not that simple! Would be grateful if you could point out where I'm going wrong

cheers


  Code:
2012-05-01 14:33:36,815 WARN  [PluginCompilerThread] Plugin firstrowsports.groovy failed to compile: startup failed:
/Applications/serviio-0.6.2-osx/Serviio.app/Contents/Resources/Java/plugins/firstrowsports.groovy: 495: Apparent variable 'extractor' was found in a static scope but doesn't refer to a local variable, static field or class. Possible causes:
You attempted to reference a variable in the binding or an instance variable from a static context.
You misspelled a classname or statically imported field. Please check the spelling.
You attempted to use a method 'extractor' but left out brackets in a place not allowed by the grammar.
 @ line 495, column 18.
         firstrowsports extractor = new firstrowsports()
                    ^

/Applications/serviio-0.6.2-osx/Serviio.app/Contents/Resources/Java/plugins/firstrowsports.groovy: 496: Apparent variable 'extractor' was found in a static scope but doesn't refer to a local variable, static field or class. Possible causes:
You attempted to reference a variable in the binding or an instance variable from a static context.
You misspelled a classname or statically imported field. Please check the spelling.
You attempted to use a method 'extractor' but left out brackets in a place not allowed by the grammar.
 @ line 496, column 10.
         assert extractor.extractorMatches( new URL("http://www.firstrowsports.eu") )
            ^

/Applications/serviio-0.6.2-osx/Serviio.app/Contents/Resources/Java/plugins/firstrowsports.groovy: 497: Apparent variable 'extractor' was found in a static scope but doesn't refer to a local variable, static field or class. Possible causes:
You attempted to reference a variable in the binding or an instance variable from a static context.
You misspelled a classname or statically imported field. Please check the spelling.
You attempted to use a method 'extractor' but left out brackets in a place not allowed by the grammar.
 @ line 497, column 11.
         assert !extractor.extractorMatches( new URL("http://google.com/feeds/api/standardfeeds/top_rated?time=today") )
             ^

/Applications/serviio-0.6.2-osx/Serviio.app/Contents/Resources/Java/plugins/firstrowsports.groovy: 498: Apparent variable 'extractor' was found in a static scope but doesn't refer to a local variable, static field or class. Possible causes:
You attempted to reference a variable in the binding or an instance variable from a static context.
You misspelled a classname or statically imported field. Please check the spelling.
You attempted to use a method 'extractor' but left out brackets in a place not allowed by the grammar.
 @ line 498, column 37.
         WebResourceContainer container  = extractor.extractItems( new URL("http://firstrowsports.eu?&estreams=4"), -1)   
                                       ^

/Applications/serviio-0.6.2-osx/Serviio.app/Contents/Resources/Java/plugins/firstrowsports.groovy: 500: Apparent variable 'extractor' was found in a static scope but doesn't refer to a local variable, static field or class. Possible causes:
You attempted to reference a variable in the binding or an instance variable from a static context.
You misspelled a classname or statically imported field. Please check the spelling.
You attempted to use a method 'extractor' but left out brackets in a place not allowed by the grammar.
 @ line 500, column 32.
         ContentURLContainer result = extractor.extractUrl(container.getItems()[1], PreferredQuality.MEDIUM)
                                  ^

5 errors
<<

jhb50

DLNA master

Posts: 2854

Joined: Thu Jun 30, 2011 9:32 pm

Post Tue May 01, 2012 4:12 pm

Re: DYNAMIC SPORTS STREAMS LIBRARY

You need to learn how to write a valid groovy. Your errors have nothing to do with the site being extracted. Also need to use a site that works..firstrowsports.eu does not respond/probably has been seized like firstrowsports.tv, and then you will have to learn how that site extracts its urls and then maintain the code as they change their methods to keep others from using their streams. Simple if you have 3 months+ to work on it.
<<

GoingCommando18

Serviio newbie

Posts: 1

Joined: Fri Mar 13, 2015 2:11 am

Post Fri Mar 13, 2015 2:18 am

Re: DYNAMIC SPORTS STREAMS LIBRARY

I'm completely new to this, and I thought that I understood this tutorial as it was very well written (so thank you!).
However I can't seem to get it to work.
I've moved the GROOVY file to the plugins folder. I added http://www.hahasport.com/c-3.html?estreams=9 as a WebResource.
I can't download the Refresh On Demand because I'm using Mac, but with V2 of HAHASPORT, I shouldn't need to correct? At least not to see the streams initially.
I keep looking in my "Online" folder and can't find anything (nor in other folders). Any help for a complete Serviio/streaming newbie? Thanks!
<<

TechWhizZ199

Serviio lover

Posts: 56

Joined: Thu Mar 27, 2014 11:25 pm

Post Fri Mar 20, 2015 2:39 am

Re: DYNAMIC SPORTS STREAMS LIBRARY

GoingCommando18 wrote:I'm completely new to this, and I thought that I understood this tutorial as it was very well written (so thank you!).
However I can't seem to get it to work.
I've moved the GROOVY file to the plugins folder. I added http://www.hahasport.com/c-3.html?estreams=9 as a WebResource.
I can't download the Refresh On Demand because I'm using Mac, but with V2 of HAHASPORT, I shouldn't need to correct? At least not to see the streams initially.
I keep looking in my "Online" folder and can't find anything (nor in other folders). Any help for a complete Serviio/streaming newbie? Thanks!

This does not work anymore. Along with all the other sports plugins for Serviio, unfortunately.

Return to Video streams

Who is online

Users browsing this forum: No registered users and 1 guest

Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by ST Software for PTF.