2015-03-13 21:24:59 +00:00
|
|
|
import xbmcaddon
|
|
|
|
import xbmcplugin
|
|
|
|
import xbmc
|
|
|
|
import xbmcgui
|
|
|
|
import os
|
|
|
|
import threading
|
|
|
|
import json
|
|
|
|
import urllib
|
|
|
|
|
|
|
|
addonSettings = xbmcaddon.Addon(id='plugin.video.mb3sync')
|
|
|
|
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-18 17:54:30 +00:00
|
|
|
|
2015-03-13 21:24:59 +00:00
|
|
|
mode = params.get('mode',"")
|
|
|
|
id = params.get('id',"")
|
|
|
|
|
|
|
|
if mode == "play":
|
|
|
|
PlaybackUtils().PLAY(id)
|
2015-03-18 17:54:30 +00:00
|
|
|
|
|
|
|
else:
|
|
|
|
xbmc.executebuiltin('Addon.OpenSettings(plugin.video.mb3sync)')
|
2015-03-13 21:24:59 +00:00
|
|
|
|