WIP Hulu using Chrome/Flashplayer projector - Alpha Release
#16
I'm using a Harmony remote programmed to act as a Microsoft Media Center Extender remote for Kodi. I also added MCE keyboard functionality to it. So, really, the ability to use the normal MCE remote controls is what we're after here, since that should be pretty standard for Kodi.
Reply
#17
I'll have a look around for a valid version of sendkeys.exe to use with Windows. I did this in the past and ran into problems putting the .exe into the repo. Give me a week or two, there are other things on my plate right now.
Reply
#18
Any updates on it? When I try to run it w/ Kodi, I get an error related to username:
http://pastebin.com/DUiRn4m5

10:56:51 T:4459778048 ERROR: EXCEPTION Thrown (PythonToCppException) : -->Python callback/script returned the following error<--
- NOTE: IGNORING THIS CAN LEAD TO MEMORY LEAKS!
Error Type: <type 'exceptions.KeyError'>
Error Contents: 'USERNAME'
Reply
#19
(2015-01-22, 20:59)keith Wrote: Any updates on it? When I try to run it w/ Kodi, I get an error related to username:
http://pastebin.com/DUiRn4m5

10:56:51 T:4459778048 ERROR: EXCEPTION Thrown (PythonToCppException) : -->Python callback/script returned the following error<--
- NOTE: IGNORING THIS CAN LEAD TO MEMORY LEAKS!
Error Type: <type 'exceptions.KeyError'>
Error Contents: 'USERNAME'

It works fine under Windows, I see that you're using OS/X and possibly there's an issue with how the environment variable is being used,.
Did this work for you under a previous version of XBMC/Kodi?
Have you actually entered a Hulu user name and password? You can set up a free account and it should work fine. Do not enable Hulu Plus unless you have a Hulu Plus account.
Sorry, I won't get a chance to test on a Mac for a couple of weeks (away on biz).
Reply
#20
No, first time testing it out, using latest release. I know you said it works under Windows, but I saw someone say it worked under Linux, so had to try it on OSX.

I did enter in a username/pass, no difference.

Let me know if there's anything else you'd like me to try. Thanks!
Reply
#21
Just installed today, and tried to play a show. Here's the log:

12:18:19 T:4676 NOTICE: DVDPlayer: Opening: http://www.hulu.com/stand_alone/60497881
12:18:19 T:4676 WARNING: CDVDMessageQueue(player)::Put MSGQ_NOT_INITIALIZED
12:18:19 T:5824 NOTICE: Thread DVDPlayer start, auto delete: false
12:18:20 T:5824 NOTICE: Creating InputStream
12:18:21 T:5824 NOTICE: Creating Demuxer
12:18:21 T:5280 NOTICE: Thread FileCache start, auto delete: false
12:18:21 T:5824 ERROR: CDVDDemuxFFmpeg::Open - error probing input format, http://www.hulu.com/stand_alone/60497881
12:18:21 T:5824 ERROR: CDVDPlayer::OpenDemuxStream - Error creating demuxer

12:18:21 T:5824 NOTICE: CDVDPlayer::OnExit()
12:18:21 T:4676 ERROR: Playlist Player: skipping unplayable item: 0, path [plugin://plugin.video.huluchrome/?url="60497881"&mode="TV_play"&videoid="735263"&eid="nwNvWiwGAMMKNHRFdRjVSw"]
12:18:21 T:4160 NOTICE: Thread BackgroundLoader start, auto delete: false
12:18:21 T:4676 NOTICE: CDVDPlayer::CloseFile()
12:18:21 T:4676 NOTICE: DVDPlayer: waiting for threads to exit
12:18:21 T:4676 NOTICE: DVDPlayer: finished waiting
12:18:21 T:3340 NOTICE: service.py SynopsiPlayer: onPlayBackStopped
12:18:21 T:4676 NOTICE: CDVDPlayer::CloseFile()
12:18:21 T:4676 NOTICE: DVDPlayer: waiting for threads to exit
12:18:21 T:4676 NOTICE: DVDPlayer: finished waiting
Reply
#22
(2015-01-22, 22:23)snakyjake Wrote: Just installed today, and tried to play a show. Here's the log:

Try reading the forum thread and the instructions that are in the addon directory. You need to setup playercorefactory.xml. You need to read the caveats on the first page of the thread. This is not a plug-and-play addon. It works if you put in the effort.
Reply
#23
(2015-01-22, 21:45)keith Wrote: No, first time testing it out, using latest release. I know you said it works under Windows, but I saw someone say it worked under Linux, so had to try it on OSX.

I did enter in a username/pass, no difference.

Let me know if there's anything else you'd like me to try. Thanks!

I need to go back and look at the code, it's been sometime since I looked at it and I don't think I ever looked in the module that you're having problems with. I know that a number of python functions close to the OS behave differently under OS/X, urlparse being the one I normally see problems with. I suspect that this is similiar, I'm just surprised no one has seen it earlier as most of this is Bluecop's original addon. I'll be re-united with my Mac in a couple of weeks worst case. Be patient, I'm sure we'll sort it out.

UPDATE: Can you just comment out this line of code in _home.py file in plugin.video.huluchrome-4.0.2/resources/lib/_home.py?
Code:
print "User Name = "+str(os.environ['USERNAME'])

You comment out a line of python by putting a # char in the first position of the line, so it should look like:
Code:
#                      print "User Name = "+str(os.environ['USERNAME'])

Save the file and try running it again. As far as I can see that line doesn't do anything and a grep of all the py files doesn't show os.envrion being used anywhere else, so let's get rid of it and try. Thanks.
Reply
#24
Here is the instructions I followed:

1. Already have Google Chrome installed.
2. Logged into Hulu, and didn't logout.
3. Exit the chrome browser.
4. Install plugin.video.huluchrome addon.
5. Here is my playercorefactory.xml. I tested the player filename location. I have two of these files, and changed both of them.

<playercorefactory>
<players>
<player name="HULUPLAYER" type="ExternalPlayer" audio="false" video="true">
<filename>C:\Program Files (x86)\Google\Chrome\Application\chrome.exe</filename>
<args>--new-window --window-position=0,0 --child-clean-exit --kiosk "{1}"</args>
<hidexbmc>true</hidexbmc>
<hideconsole>false</hideconsole>
<warpcursor>none</warpcursor>
</player>
</players>
<rules action="prepend">
<rule filename="http://www.hulu.com*" player="HULUPLAYER"/>
</rules>
</playercorefactory>

6. Configured plugin.video.huluchrome. I can login and see my subscriptions.
7. Play a Hulu Clip and it says: Opening Stream -> Working -> Error "Playback Failed" -> see the log I posted earlier.
Reply
#25
UPDATE: Can you just comment out this line of code in _home.py file in plugin.video.huluchrome-4.0.2/resources/lib/_home.py?
Code:
print "User Name = "+str(os.environ['USERNAME'])
[/quote]

Yup and this worked! But it still didn't open up Chrome properly.

I've edited my playercore.xml so far to look like this:
<filename>"/Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome"</filename>
<args>--start-fullscreen --disable-translate --disable-new-tab-first-run --no-default-browser-check --no-first-run --kiosk "{1}"</args>

And it doesn't load up fullscreen properly (the flash applet itself) and even more annoying, if I close the browser, when I click on another file it will load up the new hulu video in a tab, with the old one playing in the background as well.

I'd love to see this linked with the Chrome Program Launcher, which I use with Netflixbmc and works great.

Getting closer though!
Reply
#26
(2015-01-23, 03:10)keith Wrote: I've edited my playercore.xml so far to look like this:
<filename>"/Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome"</filename>
<args>--start-fullscreen --disable-translate --disable-new-tab-first-run --no-default-browser-check --no-first-run --kiosk "{1}"</args>

And it doesn't load up fullscreen properly (the flash applet itself) and even more annoying, if I close the browser, when I click on another file it will load up the new hulu video in a tab, with the old one playing in the background as well.

I'm not sure what --disable-new-tab-first-run --no-default-browser-check --no-first-run parms do, though they seem obvious.
Can you try adding the --window-position and --new-window parms, my working xml reads like this:
Code:
<player name="GCP" type="ExternalPlayer" audio="false" video="true">
<filename>C:\Program Files (x86)\Google\Chrome\Application\chrome.exe</filename>
<args> --new-window --window-position=0,0 --start-fullscreen --kiosk --child-clean-exit "{1}"</args>
<hidexbmc>true</hidexbmc>
<hideconsole>true</hideconsole>
<warpcursor>none</warpcursor>
</player>

I remember that there is an issue if chrome is logged to a user profile. I think earlier in this thread someone sorted that out. Let me know if this helps.
UPDATE: You must make sure that chrome is closed before starting Kodi (actually before trying to play a Hulu video) or you will have a problem like you describe above.
Reply
#27
(2015-01-23, 03:43)learningit Wrote: I'm not sure what --disable-new-tab-first-run --no-default-browser-check --no-first-run parms do, though they seem obvious.
Can you try adding the --window-position and --new-window parms, my working xml reads like this:
Code:
<player name="GCP" type="ExternalPlayer" audio="false" video="true">
<filename>C:\Program Files (x86)\Google\Chrome\Application\chrome.exe</filename>
<args> --new-window --window-position=0,0 --start-fullscreen --kiosk --child-clean-exit "{1}"</args>
<hidexbmc>true</hidexbmc>
<hideconsole>true</hideconsole>
<warpcursor>none</warpcursor>
</player>

I remember that there is an issue if chrome is logged to a user profile. I think earlier in this thread someone sorted that out. Let me know if this helps.

Swapped out those args and now it loads in fullscreen (but still with tabs across the top, menubar, etc) and still loads up the previous hulu video in a back tab.

Is this how it works in Windows?


I looked in the thread for previous posts about a user profile but didn't see anything?

Thanks!
Reply
#28
(2015-01-23, 01:43)snakyjake Wrote: 6. Configured plugin.video.huluchrome. I can login and see my subscriptions.
7. Play a Hulu Clip and it says: Opening Stream -> Working -> Error "Playback Failed" -> see the log I posted earlier.

I don't see anything wrong with what you're doing in the above, but the Kodi log is telling us that the external player isn't configured / recognized. Are you putting playercorefactory.xml in the correct userdata directory? Also you need to restart Kodi after you make changes to playercorefactory.xml as I believe it is only read on startup. If you are still having problems, please post a full log with debug logging enabled so I can see how the playercorefactory.xml is being processed. The error is clear in that the external player isn't being evoked as ffmpeg is trying to play the url.
Reply
#29
(2015-01-23, 03:51)keith Wrote: Swapped out those args and now it loads in fullscreen (but still with tabs across the top, menubar, etc) and still loads up the previous hulu video in a back tab.

Is this how it works in Windows?

No, it's full screen. 2 things to think about: 1) are you using chrome user profile or user login in chrome? (if so, try logging out of the chrome user profile and closing chrome then running Kodi); and 2) is chrome already open when you are running Kodi? (if so try closing chrome first).

Somewhere there is a thread where someone described to me how they created a separate Kodi user for huluchrome and what the parameters are to add to the command line to login the user in. I'll try to find it tomorrow. I believe that there may be variations between the chrome and chromium browser parameters.

It's hard to find a list of the chrome command line parameters, you can look here to see if there are some OS/X differences:
http://peter.sh/experiments/chromium-com...-switches/

Also, once you get it working, this link of keyboard shortcuts may be useful:
https://support.google.com/chromebook/an...3101?hl=en
Reply
#30
(2015-01-23, 03:51)keith Wrote: Swapped out those args and now it loads in fullscreen (but still with tabs across the top, menubar, etc) and still loads up the previous hulu video in a back tab.

Is this how it works in Windows?

Thinking about your menu bars and tabs still being there, and assuming that chrome is already closed when you run huluchrome, it seems like the --kiosk command isn't being processed by chrome. You may want to test the use of the parm from the command line to see that it gets processed correctly under OS/X.
Also if you exit from chrome as an external player by killing it from the menu bar (clicking the 'x'), you will get a very annoying 'Restore Chrome' error bar popping up the next time you run chrome. To avoid that, you need to exit using ctl+shift+Q.
Reply

Logout Mark Read Team Forum Stats Members Help
Hulu using Chrome/Flashplayer projector - Alpha Release0