Skip to content

Commit

Permalink
Merge pull request #59 from waterfoul/master
Browse files Browse the repository at this point in the history
Add the ability to launch the Netflix app on android
  • Loading branch information
andrewleech committed Aug 5, 2015
2 parents 41db4d9 + 81ed3cf commit 34fd698
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
4 changes: 2 additions & 2 deletions addon.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@
<requires>
<import addon="xbmc.python" version="2.1.0"/>
<import addon="script.module.requests" version="2.4.3"/>
<import addon="plugin.program.chrome.launcher" version="1.1.2"/>
<import addon="plugin.program.chrome.launcher" version="1.1.2" optional="true"/>
<import addon="script.module.pydevd" version="2.1.0" optional="true"/>
</requires>
<extension point="xbmc.python.pluginsource" library="default.py">
<provides>video</provides>
</extension>
<extension point="xbmc.addon.metadata">
<platform>windx osx linux</platform>
<platform>windx osx linux android</platform>
<summary lang="en">NetfliXBMC - Unofficial Netflix Add-on (Win/OSX/Linux)</summary>
<language></language>
<description lang="en">NetfliXBMC - Unofficial Netflix Add-on (Win/OSX/Linux)</description>
Expand Down
5 changes: 5 additions & 0 deletions default.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@
osWin = xbmc.getCondVisibility('system.platform.windows')
osLinux = xbmc.getCondVisibility('system.platform.linux')
osOSX = xbmc.getCondVisibility('system.platform.osx')
osAndroid = xbmc.getCondVisibility('system.platform.android')
addonDir = xbmc.translatePath(addon.getAddonInfo('path'))
defaultFanart = os.path.join(addonDir ,'fanart.png')
addonUserDataFolder = xbmc.translatePath("special://profile/addon_data/"+addonID)
Expand Down Expand Up @@ -683,6 +684,8 @@ def playVideoMain(id):
subprocess.Popen('cliclick kp:arrow-up', shell=True)
except:
pass
elif osAndroid:
xbmc.executebuiltin('XBMC.StartAndroidActivity("","android.intent.action.VIEW","","' + urlMain+'/watch/' + id + '")')
elif osLinux:
if linuxUseShellScript:
xbmc.executebuiltin('LIRC.Stop')
Expand Down Expand Up @@ -1282,6 +1285,8 @@ def onAction(self, action):
subprocess.Popen('cliclick kp:arrow-down', shell=True)
else:
self.close()
elif osAndroid:
pass #I don't know if we can do this on android, We also may not need to as the netflix app should respond to remotes


params = parameters_string_to_dict(sys.argv[2])
Expand Down

0 comments on commit 34fd698

Please sign in to comment.