Kodi Community Forum
Hulu Plugin Development Thread - Developers only! - Printable Version

+- Kodi Community Forum (https://forum.kodi.tv)
+-- Forum: Development (https://forum.kodi.tv/forumdisplay.php?fid=32)
+--- Forum: Add-ons (https://forum.kodi.tv/forumdisplay.php?fid=26)
+--- Thread: Hulu Plugin Development Thread - Developers only! (/showthread.php?tid=45888)

Pages: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19


- HermitSinister - 2010-06-24

BlueCop Wrote:One thing we could do is support the User's queue and Subscriptions via their RSS feeds. You could make it public in hulu settings and we could access it with the plug-in with just a username. It would be pretty simple and I doubt it would break.

I added some simple Queue and Subscription browsing functionality. Note there are two new settings ("Hulu Username for Queue Listing" and "Hulu Username for Subscription Feed") to support this. These need to be set or the new menu items will not show up in the list. Also, the Queue and Subscriptions have to be set to public on Hulu. If anyone wants to give it a try:

http://gitorious.org/xbmc-hulu/hermitsinisters-xbmc-hulu

Seems to be working well so far.


- kreach - 2010-06-25

For the search, I just don't want to make Hulu more mad than necessary.


- highlandsun - 2010-06-27

I was thinking we can probably keep Hulu happy by hitting their ad counters. Then they continue to generate ad revenue so no loss to them and everyone wins.

The only reason I moved the plugin to gitorious was that I was told that the Hulu code in SVN was dead and I would not be able to get svn commit access to it. If you already have SVN access to the original tree then by all means feel free to take it back to there. In the meantime, if you submit merge requests on gitorious I will continue to pull them into my tree. My main concern is if the code base gets fragmented. Please, if you want to move the code back to SVN, first get a consolidated tree off of git with all of the latest patches/enhancements, and then I'll shutdown my git repo.

The code I started from (get_hulu perl script) also has support for their subtitles, but since I didn't know how to associate a subtitle file with the current stream in XBMC I didn't bother to port that over to the python module. If you know how to do that, we can certainly add the subtitle data easily enough.


- BlueCop - 2010-06-27

Thanks HermitSinister!

They started encrypting their subtitles. I am working on the decryption for it.

I agree fragmentation is a worry. I also want people who want to contribute having access to submit. I would say we continue on your git because it seems people are contributing to it.

I can't theorize on what would make hulu happy. They don't work very hard to make me happy. I would love to see a full featured hulu client for xbmc but that won't happen due to various restrictions by hulu or imposed upon hulu by content partners. The problem for me is that flash sucks and sucks hard. Their Linux support is really horrible. This might change now they are supporting linux based android platforms. Hulu is so crappy on my Atom/ION HTPC that it is unusable because of flash dependence. hulu desktop on linux is a completely unusable for me. I can't playback the lowest quality stream without severe stutter. This isn't the decoding but the rendering to the screen. There are many ways flash could improve itself on linux that adobe just won't implement. Just try to run hulu desktop under linux at 1920x1080(or 1200). It doesn't even work well on my Core i7. It is pathetic that my old xbox can decode and output the hulu video better then my modern pc. If they ever support my chosen platform in a use-able way I will stop using this plug-in. I would like to support hulu because it is a great service. They don't support me and my chosen platform unfortunately.

Sorry for the rant...


- BlueCop - 2010-06-27

HermitSinister: just got a chance to try your code. I had to update it a little because I am using hulu on a with the new addon system.

Queue is working fine.
Subscriptions seems broken. If I didn't do something wrong. It is attempting to play the show url rather then list the episodes.


- highlandsun - 2010-06-27

subtitle decryption is already implemented in the get-flash-videos Hulu plugin. (If you can read perl) you can do the same here, all of the algorithms and keys are already present.

http://gitorious.org/get-flash-videos-plugins/gfv-plugins


- highlandsun - 2010-06-27

HermitSinister Wrote:I added some simple Queue and Subscription browsing functionality. Note there are two new settings ("Hulu Username for Queue Listing" and "Hulu Username for Subscription Feed") to support this. These need to be set or the new menu items will not show up in the list. Also, the Queue and Subscriptions have to be set to public on Hulu. If anyone wants to give it a try:

http://gitorious.org/xbmc-hulu/hermitsinisters-xbmc-hulu

Seems to be working well so far.

Send a merge request if you want me to add this into my repo.


- HermitSinister - 2010-06-28

BlueCop Wrote:HermitSinister: just got a chance to try your code. I had to update it a little because I am using hulu on a with the new addon system.

Queue is working fine.
Subscriptions seems broken. If I didn't do something wrong. It is attempting to play the show url rather then list the episodes.

Yeah, it hasn't been tested with the newer post-addon builds. I have tested successfully with exobuzz's rtmp patched Xbox and Linux builds based on SVN 30369 and SVN 28256 respectively. I suspect the issue you are having may be related to this from /resources/lib/_rss.py

Code:
if common.args.name == 'Recently Added Shows' or common.args.name == 'My Subscriptions':
                common.addDirectory(name, url, 'RSS_Shows', thumb, thumb, fanart, plot, genre)
            else:
                common.addDirectory(name, url, 'RSS_play', thumb, thumb, fanart, plot, genre)

It seems like maybe common.args.name is not matching "My Subscriptions", so maybe it is not getting passed correctly, possibly due to string localization issues from your addon conversion. You could verify by checking to see of "Recently Added Shows" behaves the same way, since they are handled in the exact same way.


- BlueCop - 2010-06-28

opps It was a problem with my english strings.xml
sorry all is functional. =)

So hulu launched their pay service. You have to request an invite right now to get in.

+ They will stream 720p for hulu plus
- will still have ads


- highlandsun - 2010-06-29

master and addon branch are now sync'd up on gitorious, thanks BlueCop and HermitSinister. Note that there were some bugs in librtmp's URL parsing, so level3 streams won't work unless you grab the latest librtmp from SVN.


- CrashX - 2010-06-30

Just wanted to confirm, do we still need patch since I see alot of commits in the trunk for librtmp ?

Basically we just need addon script files right ?


- jmarshall - 2010-07-01

Yeah - it should work just fine in trunk now.


- CrashX - 2010-07-01

Using Ubuntu 9.10 x86
Updated XBMC to revision 31541S ( latest trunk )
Extracted folder "Crypto" from http://ftp.dlitz.net/pub/dlitz/crypto/pycrypto/pycrypto-2.1.0.tar.gz to /usr/local/share/xbmc/system/python/Lib.
Downloaded http://gitorious.org/xbmc-hulu/xbmc-hulu/archive-tarball/addon and extracted to ~/.xbmc/addons/plugin.video.hulu

Launced XBMC and it hulu shows up. I tried to play a video and I get script error:

Code:
start of HULU plugin
02:02:28 T:3028138864 M:1767501824  NOTICE: HULU--> common.args.mode -- > RSS_play
02:02:28 T:3028138864 M:1766699008   DEBUG: xbp_dlopen loading python lib /usr/local/share/xbmc/system/python/python24.zip/array.so. flags: 2
02:02:28 T:3028138864 M:1766584320   DEBUG: Loading: /home/crashx/.xbmc/temp/array.so
02:02:28 T:3028138864 M:1766584320   DEBUG: RegisterExtensionLib, adding array.so (0xa880818)
02:02:28 T:3028138864 M:1766584320   DEBUG: xbp_dlsym - load symbol initarray
02:02:28 T:3028138864 M:1768681472  NOTICE: http://www.hulu.com/watch/161027/movie-trailers-despicable-me---the-girls-ask-vector-about-his-pajamas#http%3A%2F%2Fwww.hulu.com%2Ffeed%2Frecent%2Fmovies%3Frd%3D0
02:02:28 T:3028138864 M:1768681472  NOTICE: HULU --> common :: getHTML :: url = http://www.hulu.com/watch/161027/movie-trailers-despicable-me---the-girls-ask-vector-about-his-pajamas#http%3A%2F%2Fwww.hulu.com%2Ffeed%2Frecent%2Fmovies%3Frd%3D0
02:02:29 T:3028138864 M:1768624128    INFO: -->Python script returned the following error<--
02:02:29 T:3028138864 M:1768624128   ERROR: Error Type: exceptions.ImportError
02:02:29 T:3028138864 M:1768624128   ERROR: Error Contents: No module named crypto.cipher.rijndael
02:02:29 T:3028138864 M:1768624128   ERROR: Traceback (most recent call last):
                                              File "/home/crashx/.xbmc/addons/plugin.video.hulu/default.py", line 57, in ?
                                                modes ( )
                                              File "/home/crashx/.xbmc/addons/plugin.video.hulu/default.py", line 36, in modes
                                                stream_media.Main()
                                              File "/home/crashx/.xbmc/addons/plugin.video.hulu/resources/lib/stream_hulu.py", line 18, in __init__
                                                self.play()
                                              File "/home/crashx/.xbmc/addons/plugin.video.hulu/resources/lib/stream_hulu.py", line 111, in play
                                                cid=self.decrypt_cid(ecid)
                                              File "/home/crashx/.xbmc/addons/plugin.video.hulu/resources/lib/stream_hulu.py", line 91, in decrypt_cid
                                                ecb = AES(binascii.unhexlify(cidkey))
                                              File "/home/crashx/.xbmc/addons/plugin.video.hulu/resources/lib/aes.py", line 6, in AES
                                                from crypto.cipher.rijndael import Rijndael
                                            ImportError: No module named crypto.cipher.rijndael
02:02:29 T:3028138864 M:1768624128    INFO: -->End of Python script error report<--
02:02:29 T:3028138864 M:1768624128    INFO: Python script stopped

I noticed the folder name "Crypto" isn't "crypto" ? Does it matter since this is linux ?


- highlandsun - 2010-07-01

jmarshall Wrote:Yeah - it should work just fine in trunk now.

I just built SVN r31541 without any other patches, and it all is working well.

I probably should switch the git "addon" branch to become the master, and leave the old plugin version in some "old" or "compat" branch.


- highlandsun - 2010-07-01

CrashX Wrote:Using Ubuntu 9.10 x86
Updated XBMC to revision 31541S ( latest trunk )
Extracted folder "Crypto" from http://ftp.dlitz.net/pub/dlitz/crypto/pycrypto/pycrypto-2.1.0.tar.gz to /usr/local/share/xbmc/system/python/Lib.

That was your mistake. Read the pycrypto README, don't just extract directories willy-nilly. You'll never get anywhere if you don't follow directions.