Ejemplo n.º 1
0
# Qlock screensaver add-on by phil65
# credits to donabi & amet

import os
import sys
import xbmcaddon
import xbmc

__addon__ = xbmcaddon.Addon()
__addonid__ = __addon__.getAddonInfo('id')
__cwd__ = __addon__.getAddonInfo('path').decode("utf-8")
__resource__ = xbmc.translatePath(
    os.path.join(__cwd__, 'resources', 'lib').encode("utf-8")).decode("utf-8")

sys.path.append(__resource__)

if __name__ == '__main__':
    import gui
    screensaver_gui = gui.Screensaver('script-python-qlock.xml', __cwd__,
                                      'default')
    screensaver_gui.doModal()
Ejemplo n.º 2
0
import os, sys
import xbmc, xbmcaddon

ADDON = xbmcaddon.Addon()
ADDONID = ADDON.getAddonInfo('id')
CWD = ADDON.getAddonInfo('path').decode("utf-8")
ADDONVERSION = ADDON.getAddonInfo('version')
LANGUAGE = ADDON.getLocalizedString
RESOURCE = xbmc.translatePath(
    os.path.join(CWD, 'resources', 'lib').encode("utf-8")).decode("utf-8")

sys.path.append(RESOURCE)

from utils import *

if __name__ == '__main__':
    log('script version %s started' % ADDONVERSION)
    import gui
    screensaver_gui = gui.Screensaver('script-python-slideshow.xml', CWD,
                                      'default')
    screensaver_gui.doModal()
    del screensaver_gui
log('script stopped')
Ejemplo n.º 3
0
#    along with this program. If not, see <http://www.gnu.org/licenses/>.
#

import os
import xbmcaddon
import xbmcgui
import xbmc

addon = xbmcaddon.Addon()
addon_name = addon.getAddonInfo('name')
addon_path = addon.getAddonInfo('path')

__addon__ = xbmcaddon.Addon()
__addonid__ = __addon__.getAddonInfo('id')
__cwd__ = __addon__.getAddonInfo('path').decode("utf-8")
__resource__ = xbmc.translatePath(
    os.path.join(__cwd__, 'resources', 'lib').encode("utf-8")).decode("utf-8")

sys.path.append(__resource__)

if __name__ == '__main__':
    import gui
    screensaver_gui = gui.Screensaver(
        'unaryclock.xml',
        addon_path,
        'default',
    )
    screensaver_gui.doModal()
    del screensaver_gui
    sys.modules.clear()
Ejemplo n.º 4
0
import os, sys, subprocess
import xbmc, xbmcaddon, xbmcgui

__addon__ = xbmcaddon.Addon()
__addonid__ = __addon__.getAddonInfo('id')
__cwd__ = __addon__.getAddonInfo('path')
__language__ = __addon__.getLocalizedString
__resource__ = xbmc.translatePath(
    os.path.join(__cwd__, 'resources', 'lib').encode('utf-8'))

# Hack: Python2/Python3 fix
if sys.version_info.major < 3:
    __cwd__ = __cwd__.decode('utf-8')
    __resource__ = __resource__.decode('utf-8')

sys.path.append(__resource__)

if __name__ == '__main__':
    import gui
    screensaver_gui = gui.Screensaver('dummy.xml', __cwd__, 'default')
    screensaver_gui.doModal()
    del screensaver_gui
    __addon__ = __addonid__ = __cwd__ = __language__ = __resource__ = None
Ejemplo n.º 5
0
#    You should have received a copy of the GNU General Public License
#    along with this program. If not, see <http://www.gnu.org/licenses/>.

import os
import sys
import xbmc
import xbmcaddon

ADDON = xbmcaddon.Addon()
ADDONID = ADDON.getAddonInfo('id')
ADDON_VERSION = ADDON.getAddonInfo('version')
CWD = ADDON.getAddonInfo('path').decode("utf-8")
ADDON_NAME = ADDON.getAddonInfo('name')
ADDON_LANGUAGE = ADDON.getLocalizedString
ADDON_ICON = ADDON.getAddonInfo('icon')
ADDON_RESOURCE = xbmc.translatePath(
    os.path.join(CWD, 'resources', 'lib').encode("utf-8")).decode("utf-8")

sys.path.append(ADDON_RESOURCE)

xbmc.log(msg='%s version %s started' % (ADDON_NAME, ADDON_VERSION),
         level=xbmc.LOGDEBUG)
if (__name__ == "__main__"):
    import gui
    screensaver_gui = gui.Screensaver('screensaver-playlist.xml', CWD,
                                      'default')
    screensaver_gui.doModal()
    del screensaver_gui
xbmc.log(msg='%s version %s stopped' % (ADDON_NAME, ADDON_VERSION),
         level=xbmc.LOGDEBUG)
############################################
#   CREDITS:
#   - zag2me For the screensaver starter example
#   - Lunatixz: For learning from his google earth screensaver code
#   - jurialmunkey: For assets from Aura and styling inspiration
#   - marcelveldt: For assets from image-overlays pack
#     Thanks!
############################################

import xbmc
import xbmcgui
import xbmcaddon
import sys
import gui

addon = xbmcaddon.Addon('script.screensaver.moviesandtvshows')
addon_name = addon.getAddonInfo('name')
addon_path = addon.getAddonInfo('path')

# run
if __name__ == '__main__':

    # start
    screensaver_gui = gui.Screensaver('default.xml', addon_path, 'default')
    screensaver_gui.doModal()

    # exit
    del screensaver_gui
    sys.modules.clear()