Пример #1
0
    def _manage_shortcuts(self, group, defaultGroup, nolabels, groupname):
        homeWindow = xbmcgui.Window(10000)
        if homeWindow.getProperty("skinshortcuts-loading") and int(
                calendar.timegm(gmtime())) - int(
                    homeWindow.getProperty("skinshortcuts-loading")) <= 5:
            return

        homeWindow.setProperty("skinshortcuts-loading",
                               str(calendar.timegm(gmtime())))
        from resources.lib import gui
        ui = gui.GUI("script-skinshortcuts.xml",
                     CWD,
                     "default",
                     group=group,
                     defaultGroup=defaultGroup,
                     nolabels=nolabels,
                     groupname=groupname)
        ui.doModal()
        del ui

        # Update home window property (used to automatically refresh type=settings)
        homeWindow.setProperty("skinshortcuts",
                               strftime("%Y%m%d%H%M%S", gmtime()))

        # Clear window properties for this group, and for backgrounds, widgets, properties
        homeWindow.clearProperty("skinshortcuts-" + group)
        homeWindow.clearProperty("skinshortcutsWidgets")
        homeWindow.clearProperty("skinshortcutsCustomProperties")
        homeWindow.clearProperty("skinshortcutsBackgrounds")
Пример #2
0
__settings__ = xbmcaddon.Addon(id=__addonID__)
__language__ = __settings__.getLocalizedString
__cwd__ = xbmc.translatePath(__settings__.getAddonInfo('path'))
__profile__ = xbmc.translatePath(__settings__.getAddonInfo('profile'))
BASE_RESOURCE_PATH = os.path.join(__cwd__, "resources")

# Main team credits
__credits_l1__ = __language__(910)  #"Head Developer & Coder"
__credits_r1__ = "Taxigps"
__credits_l2__ = __language__(911)  #"Original author"
__credits_r2__ = "Nuka1195 & EnderW"
__credits_l3__ = __language__(912)  #"Original skinning"
__credits_r3__ = "Smuto"

# additional credits
__add_credits_l1__ = __language__(1)  #"Xbox Media Center"
__add_credits_r1__ = "Team XBMC"
__add_credits_l2__ = __language__(913)  #"Unicode support"
__add_credits_r2__ = "Spiff"
__add_credits_l3__ = __language__(914)  #"Language file"
__add_credits_r3__ = __language__(2)  #"Translators name"

# Start the main gui or settings gui
if (__name__ == "__main__"):
    import resources.lib.gui as gui
    ui = gui.GUI("script-%s-main.xml" % __scriptname__.replace(" ", "_"),
                 __cwd__, "Default")
    ui.doModal()
    del ui
    sys.modules.clear()
Пример #3
0
import os
import sys
import default

# Script constants
__scriptname__ = sys.modules['default'].__scriptname__
__version__ = sys.modules['default'].__version__

print '[SCRIPT][%s] version %s initialized!' % (__scriptname__, __version__)

if (__name__ == '__main__'):
    if sys.argv[1] == '-runscript':
        import resources.lib.gui as gui

        ui = gui.GUI('main.xml', os.getcwd(), 'default')
        ui.doModal()
        del ui

        sys.modules.clear()
Пример #4
0
__credits_r1__ = "Taxigps"
__credits_l2__ = __language__(911)  #"Original author"
__credits_r2__ = "Nuka1195 & EnderW"
__credits_l3__ = __language__(912)  #"Original skinning"
__credits_r3__ = "Smuto"

# additional credits
__add_credits_l1__ = __language__(1)  #"Xbox Media Center"
__add_credits_r1__ = "Team XBMC"
__add_credits_l2__ = __language__(913)  #"Unicode support"
__add_credits_r2__ = "Spiff"
__add_credits_l3__ = __language__(914)  #"Language file"
__add_credits_r3__ = __language__(2)  #"Translators name"

# Start the main gui or settings gui
if (__name__ == "__main__"):
    if (xbmc.Player().isPlayingAudio()):
        import resources.lib.gui as gui
        window = "main"
    else:
        import resources.lib.settings as gui
        window = "settings"
    ui = gui.GUI(
        "script-%s-%s.xml" % (
            __scriptname__.replace(" ", "_"),
            window,
        ), os.getcwd(), "Default")
    ui.doModal()
    del ui
    sys.modules.clear()
Пример #5
0
# Script constants
__scriptname__ = "TWC Supplemental"
__author__ = "Nuka1195"
__url__ = "http://code.google.com/p/xbmc-addons/"
__svn_url__ = "http://xbmc-addons.googlecode.com/svn/trunk/scripts/TWC%20Supplemental"
__credits__ = "Team XBMC"
__version__ = "1.5.8"
__svn_revision__ = 0

xbmc.log(
    "[SCRIPT] '%s: version %s' initialized!" % (
        __scriptname__,
        __version__,
    ), xbmc.LOGNOTICE)

# Start the main gui
if (__name__ == "__main__"):
    # check if user passed an arg to set script as window
    try:
        # passed 1, so we want a window
        window = sys.argv[1] == "1"
    except:
        # nothing passed so default to dialog
        window = False
    import resources.lib.gui as gui
    ui = gui.GUI("script-twc-main.xml", os.getcwd(), "Default")
    ui.doModal()
    del ui
    sys.modules.clear()
Пример #6
0
import sys

import xbmc
import xbmcaddon

Addon = xbmcaddon.Addon('script.game.whatthemovie')

# Script constants
__addonname__ = Addon.getAddonInfo('name')
__id__ = Addon.getAddonInfo('id')
__version__ = Addon.getAddonInfo('version')
__path__ = Addon.getAddonInfo('path')

xbmc.log('[ADDON][%s] Version %s started' % (__addonname__, __version__),
         level=xbmc.LOGNOTICE)

if (__name__ == '__main__'):
    import resources.lib.gui as gui
    ui = gui.GUI('script-%s-main.xml' % __addonname__, __path__, 'default',
                 '720p')
    ui.doModal()
    xbmc.log('[ADDON][%s] Version %s exited' % (__addonname__, __version__),
             level=xbmc.LOGNOTICE)
    del ui

sys.modules.clear()
Пример #7
0
# Main team credits 
__credits_l1__ = __language__( 910 )#"Head Developer & Coder"
__credits_r1__ = "Nuka1195"
__credits_l2__ = __language__( 911 )#"Original author"
__credits_r2__ = "EnderW"
__credits_l3__ = __language__( 912 )#"Original skinning"
__credits_r3__ = "Smuto"

# additional credits 
__add_credits_l1__ = __language__( 1 )#"Xbox Media Center"
__add_credits_r1__ = "Team XBMC"
__add_credits_l2__ = __language__( 913 )#"Unicode support"
__add_credits_r2__ = "Spiff"
__add_credits_l3__ = __language__( 914 )#"Language file"
__add_credits_r3__ = __language__( 2 )#"Translators name"


# Start the main gui or settings gui 
if ( __name__ == "__main__" ):
    if ( xbmc.Player().isPlayingAudio() ):
        import resources.lib.gui as gui
        window = "main"
    else:
        import resources.lib.settings as gui
        window = "settings"
    ui = gui.GUI( "script-%s-%s.xml" % ( __scriptname__.replace( " ", "_" ), window, ), BASE_RESOURCE_PATH, "Default" )
    ui.doModal()
    del ui
    sys.modules.clear()
Пример #8
0
# Shared resources
BASE_RESOURCE_PATH = os.path.join(os.getcwd(), "resources")
__addonID__ = "script.xbmc-korea.lyrics"
__settings__ = xbmcaddon.Addon(id=__addonID__)
__language__ = __settings__.getLocalizedString

# Main team credits
__credits_l1__ = __language__(910)  #"Head Developer & Coder"
__credits_r1__ = "Taxigps"
__credits_l2__ = __language__(911)  #"Original author"
__credits_r2__ = "Nuka1195 & EnderW"
__credits_l3__ = __language__(912)  #"Original skinning"
__credits_r3__ = "Smuto"

# additional credits
__add_credits_l1__ = __language__(1)  #"Xbox Media Center"
__add_credits_r1__ = "Team XBMC"
__add_credits_l2__ = __language__(913)  #"Unicode support"
__add_credits_r2__ = "Spiff"
__add_credits_l3__ = __language__(914)  #"Language file"
__add_credits_r3__ = __language__(2)  #"Translators name"

# Start the main gui or settings gui
if (__name__ == "__main__"):
    import resources.lib.gui as gui
    ui = gui.GUI("script-%s-main.xml" % __scriptname__.replace(" ", "_"),
                 os.getcwd(), "Default")
    ui.doModal()
    del ui
    sys.modules.clear()