Page 1 of 5

NHL Gamecenter Live

PostPosted: Wed Jan 11, 2012 3:02 am
by CraigD
I have completed my NHL Gamcenter Live plugin for Serviio. Version 0.6.1 of Serviio or greater is required to use it. The plugin also has an external dependency on groovy http-builder which can be found here http://groovy.codehaus.org/modules/http-builder/. What I have done on linux to accomodate the external dependency is to create a new folder somewhere and extract all the jars from the http-builder archive into that directory and then update bin/serviio.sh to add this to the classpath. You should be able to do something similar on the other platforms; worst case, add the jars to serviio/lib (zip probably won't like this idea though).

Once you have all that goodness working, all you should need to is add a new Web Resource Item in the console with URL http://www.nhl.com/ice/gamecenterlive.htm and change the user name and password to your gamecenter username and password in the attached NHLGameCenterPlugin.groovy (at the top) then you should be rocking live hockey in Serviio!

I have been the only tester for this so far, so any questions or issues please post in this thread.

Here is a video showing it on my Samsung D series TV: http://t.co/cY5IuOPu

Re: NHL Gamecenter Live

PostPosted: Wed Jan 11, 2012 10:21 am
by zip
Good job Craig, what exactly do you need from HttpBuilder? Maybe we can take the discussion to the plugin dev forum.

Re: NHL Gamecenter Live

PostPosted: Tue Jan 17, 2012 11:14 am
by jockebure
Hi Craig, i put this groovy file in my plugins folder then add the Web Resource  in the console and that's it? ( i also added my username and pw in the file as instructed ) cause i've done that and hav'ent got anyerthing in my folder, i'm new to serviio world but i would really love to get this thing working! Thanks from Sweden

Re: NHL Gamecenter Live

PostPosted: Tue Jan 17, 2012 6:41 pm
by jockebure
2012-01-17 19:40:34,188 WARN [PluginCompilerThread] Plugin NHLGameCenterPlugin.groovy failed to compile: startup failed:
/Users/imac/Downloads/serviio-0.6.1-osx 2/Serviio.app/Contents/Resources/Java/plugins/NHLGameCenterPlugin.groovy: 9: unable to resolve class groovyx.net.http.ContentType
@ line 9, column 1.
import static groovyx.net.http.ContentType.*
^

/Users/imac/Downloads/serviio-0.6.1-osx 2/Serviio.app/Contents/Resources/Java/plugins/NHLGameCenterPlugin.groovy: 9: unable to resolve class groovyx.net.http.ContentType
@ line 9, column 1.
import static groovyx.net.http.ContentType.*
^

/Users/imac/Downloads/serviio-0.6.1-osx 2/Serviio.app/Contents/Resources/Java/plugins/NHLGameCenterPlugin.groovy: 51: unable to resolve class HTTPBuilder
@ line 51, column 16.
def tvHttp = new HTTPBuilder(tvAuthUrl);
^

/Users/imac/Downloads/serviio-0.6.1-osx 2/Serviio.app/Contents/Resources/Java/plugins/NHLGameCenterPlugin.groovy: 103: unable to resolve class HTTPBuilder
@ line 103, column 16.
def tvHttp = new HTTPBuilder(tvReqUrl);
^

/Users/imac/Downloads/serviio-0.6.1-osx 2/Serviio.app/Contents/Resources/Java/plugins/NHLGameCenterPlugin.groovy: 136: unable to resolve class HTTPBuilder
@ line 136, column 22.
def tvGameHttp = new HTTPBuilder('http://gamecenter.nhl.com');
^

/Users/imac/Downloads/serviio-0.6.1-osx 2/Serviio.app/Contents/Resources/Java/plugins/NHLGameCenterPlugin.groovy: 212: unable to resolve class HTTPBuilder
@ line 212, column 16.
def tvHttp = new HTTPBuilder(tvReqUrl);
^

6 errors






//// I get this in logs.. Please help me out on this one...Really appreciate it!

Re: NHL Gamecenter Live

PostPosted: Tue Jan 17, 2012 8:08 pm
by zip
You will need the http-builder library as described above

Re: NHL Gamecenter Live

PostPosted: Tue Jan 17, 2012 8:21 pm
by jockebure
Ok, thanks for your response but i was on that site tryin to figure out what i need from their and where to put it on my mac?

Thanks again buddy for help!

Re: NHL Gamecenter Live

PostPosted: Tue Jan 17, 2012 9:14 pm
by CraigD
As a first step I would try to use Grape. I didn't have much luck with it, but I plan to try it again on 0.6.2. To try it, add the following line to the very top of the groovy file:

  Code:
@Grab(group='org.codehaus.groovy.modules.http-builder', module='http-builder', version='0.5.2' )


Let me know how it works.

Re: NHL Gamecenter Live

PostPosted: Tue Jan 17, 2012 9:48 pm
by jockebure
oh i'm getting so frustrated, i added the string as you said but now i'm having issues with getting logs, and for the matter it doesn't show up on my tv!

Any more ideas on this and maybe whats up with my logging...

Re: NHL Gamecenter Live

PostPosted: Tue Jan 17, 2012 10:00 pm
by jockebure
ok here is some log

2012-01-17 22:59:07,807 WARN [FeedUpdaterThread] An error occured while scanning for online item information, will continue
java.io.IOException: Cannot parse resource from http://www.nhl.com/ice/gamecenterlive.htm. Message: No plugin for web resource http://www.nhl.com/ice/gamecenterlive.htm has been found.
at org.serviio.library.online.OnlineLibraryManager.findResource(OnlineLibraryManager.java:177)
at org.serviio.library.online.OnlineLibraryManager.findResourceInCacheOrParse(OnlineLibraryManager.java:184)
at org.serviio.library.online.metadata.FeedUpdaterThread.getOnlineItems(FeedUpdaterThread.java:158)
at org.serviio.library.online.metadata.FeedUpdaterThread.run(FeedUpdaterThread.java:95)


Thanksagain!

Re: NHL Gamecenter Live

PostPosted: Wed Jan 18, 2012 1:36 am
by CraigD
looks like the plugin didnt get loaded there. was this after you added the @Grab? if so, you should try to manually add the dependencies. I don't know where they go on mac. maybe someone else can help with that

Re: NHL Gamecenter Live

PostPosted: Wed Jan 18, 2012 11:08 am
by jockebure
What do you mean with "dependencies" ? This log is after i updated it with the line you asked to add.

You think i should delete that aswell?

BR

Re: NHL Gamecenter Live

PostPosted: Wed Jan 18, 2012 11:23 am
by jockebure
Ah now i get it, but haven't tried it yet, you think i should insert this in the groovy file?

<dependency>
<groupId>org.codehaus.groovy.modules.http-builder</groupId>
<artifactId>http-builder</artifactId>
<version>0.5.2</version>
</dependency>

?

Re: NHL Gamecenter Live

PostPosted: Wed Jan 18, 2012 11:27 am
by zip
I assume you have to store this file http://repository.codehaus.org/org/code ... -0.5.2.jar into the lib folder (next to the other .jar files) inside Serviio.app and restart the app.

Re: NHL Gamecenter Live

PostPosted: Wed Jan 18, 2012 1:49 pm
by CraigD

Re: NHL Gamecenter Live

PostPosted: Wed Jan 18, 2012 2:21 pm
by jockebure
Ok, thanks guys i'll add these files in that folder and we'll see how it works!

CraigD - Do you think i should keep that first line in the groovy file wich you recomended?..

Re: NHL Gamecenter Live

PostPosted: Wed Jan 18, 2012 2:23 pm
by will
The line was supposed to fetch the required files and put them in the correct place. If you are adding those files yourself, I would assume you do not need that extra line and can leave the file as it was (except for username/password changes etc)

Re: NHL Gamecenter Live

PostPosted: Wed Jan 18, 2012 3:38 pm
by moltra
I was getting alot of errors from this plugin, so I removed it from the directory.

CraigD wrote: change the user name and password to your gamecenter username and password in the attached NHLGameCenterPlugin.groovy (at the top) then you should be rocking live hockey in Serviio!



Is there any way to stop the plugin if the username and passord is not changed with out downloading the required files.

The plugin might already do this, cause I did not downlaod the required extra files.

Basically can the plugin stop itself without downloading any files, unless a user puts in his username and password.

Re: NHL Gamecenter Live

PostPosted: Wed Jan 18, 2012 5:36 pm
by jockebure
CraigD
Streaming enthusiast
Posts: 46
Joined: Tue Nov 08, 2011 2:05 pm
Wed Jan 18, 2012 1:49 pm
Re: NHL Gamecenter Live
You actually may need all the jars from http://repository.codehaus.org/org/code ... .2-all.zip


Craig - I unzipped this file now and it's a folder named http-builder-0.5.2 with content within it , should i place this file like this?

serviio (NOT console) - contents - resources - java -library - http-builder-0.5.2

Thanks!!

Re: NHL Gamecenter Live

PostPosted: Wed Jan 18, 2012 5:50 pm
by jockebure
Took a screenshoot of how it lays now... http://imageshack.us/photo/my-images/82 ... kl184.png/

Re: NHL Gamecenter Live

PostPosted: Wed Jan 18, 2012 5:54 pm
by CraigD
They need to be in the lib folder not the library folder... you also need to flatten it so that all the jars are together in there at the top level. I believe the zip has some subfolders in it.