2015-03-14 08:24:59 +11:00
|
|
|
import xbmcaddon
|
|
|
|
import xbmcplugin
|
|
|
|
import xbmc
|
|
|
|
import xbmcgui
|
|
|
|
import os
|
|
|
|
import threading
|
|
|
|
import json
|
|
|
|
import urllib
|
|
|
|
|
2015-03-26 04:37:21 +11:00
|
|
|
addonSettings = xbmcaddon.Addon(id='plugin.video.emby')
|
2015-03-14 08:24:59 +11:00
|
|
|
cwd = addonSettings.getAddonInfo('path')
|
|
|
|
BASE_RESOURCE_PATH = xbmc.translatePath( os.path.join( cwd, 'resources', 'lib' ) )
|
|
|
|
sys.path.append(BASE_RESOURCE_PATH)
|
|
|
|
|
|
|
|
WINDOW = xbmcgui.Window( 10000 )
|
|
|
|
|
|
|
|
import Utils as utils
|
|
|
|
from PlaybackUtils import PlaybackUtils
|
|
|
|
|
|
|
|
# get the actions...
|
|
|
|
params=utils.get_params(sys.argv[2])
|
2015-03-19 04:54:30 +11:00
|
|
|
|
2015-03-14 08:24:59 +11:00
|
|
|
mode = params.get('mode',"")
|
|
|
|
id = params.get('id',"")
|
|
|
|
|
|
|
|
if mode == "play":
|
|
|
|
PlaybackUtils().PLAY(id)
|
2015-03-19 04:54:30 +11:00
|
|
|
|
|
|
|
else:
|
2015-03-29 10:47:07 +11:00
|
|
|
utils.checkKodiSources()
|
2015-03-26 04:37:21 +11:00
|
|
|
xbmc.executebuiltin('Addon.OpenSettings(plugin.video.emby)')
|
2015-03-14 08:24:59 +11:00
|
|
|
|