[RELEASE] NetfliXBMC - Unofficial Netflix Add-on (Win/OSX/Linux)
(2014-10-01, 21:39)mzanetti Wrote: * Xbmc blanks the screen while chrome is playing. Is it possible to inhibit the screen saver while the addon is running?

* I tried to map lirc remote keypresses to some keyboard events to control the player window. This seems to work, however xbmc still accepts those keypresses too. Is it possible to change the browser invokation in xbmc to a blocking call, so xbmc wouldn't move around behind the scenes? Maybe that would solve the first issue too.

I've been able to solve those issues with the following hacks in the plugin:

At the beginning of the playVideoMain() function I call
Code:
xbmc.executebuiltin('InhibitIdleShutdown(true)')
xbmc.executebuiltin("LIRC.Stop()")

and at the end I clean that up with:
Code:
xbmc.executebuiltin("LIRC.Start()")
xbmc.executebuiltin('InhibitIdleShutdown(false)')

However, in order to make the method wait for the video to finish, I replaced the osLinux part with this:
Code:
path = "/usr/bin/google-chrome"
        fullUrl = getFullPath(path, url, userAgent)
        chromeProcess = subprocess.Popen(fullUrl, shell=True)

        while chromeProcess.poll() == None:
            try:
                time.sleep(1)
                subprocess.Popen('xdotool mousemove 9999 9999', shell=True)
            except:
                pass

Effectively not using ChromeLauncher to launch it, but calling Popen directly in here and wait for the process to end using poll(). I guess it would be better to still use the ChromeLauncher plugin and get some notification when it's done, but being a noob with xbmc addon development I couldn't find a way to do that.

Moving the xdotool part inside this loop works around the screen blanking issue (besides fixing the issue that the plugin hangs for 15 seconds if you start playback and immediately exit again Smile ). Unfortunately xbmc doesn't seem to offer a builtin method for inhibiting its screen blanking functionality.

Here's the full modified file: http://paste.ubuntu.com/8487872/

Would be cool if some of this would make it into future releases Smile
Reply


Messages In This Thread
Search empty? - by cgrey - 2014-01-11, 06:13
Not working on windows 7 - by dandiodati - 2014-02-26, 21:55
RE: [RELEASE] NetfliXBMC - Unofficial Netflix Add-on (Win/OSX/Linux) - by mzanetti - 2014-10-03, 21:39
Problems with this addon - by builderjer - 2014-11-30, 19:55
Logout Mark Read Team Forum Stats Members Help
[RELEASE] NetfliXBMC - Unofficial Netflix Add-on (Win/OSX/Linux)7