コード例 #1
0
def Start():
    ObjectContainer.art = R(PLUGIN_ART)
    ObjectContainer.title1 = PLUGIN_NAME
    DirectoryObject.thumb = R(PLUGIN_ICON)
    DirectoryObject.art = R(PLUGIN_ART)
    PopupDirectoryObject.thumb = R(PLUGIN_ICON)
    PopupDirectoryObject.art = R(PLUGIN_ART)

    if not Singleton.acquire():
        log.warn("Unable to acquire plugin instance")

    # Complete logger initialization
    LoggerManager.setup(storage=True)

    # Store current proxy details
    Dict["proxy_host"] = Prefs["proxy_host"]

    Dict["proxy_username"] = Prefs["proxy_username"]
    Dict["proxy_password"] = Prefs["proxy_password"]

    # Store current language
    Dict["language"] = Prefs["language"]

    # Start plugin
    m = Main()
    m.start()
コード例 #2
0
def Start():
    ObjectContainer.art = R(PLUGIN_ART)
    ObjectContainer.title1 = PLUGIN_NAME
    DirectoryObject.thumb = R(PLUGIN_ICON)
    DirectoryObject.art = R(PLUGIN_ART)
    PopupDirectoryObject.thumb = R(PLUGIN_ICON)
    PopupDirectoryObject.art = R(PLUGIN_ART)

    if not Singleton.acquire():
        log.warn('Unable to acquire plugin instance')

    # Complete logger initialization
    LoggerManager.setup(storage=True)

    # Store current proxy details
    Dict['proxy_host'] = Prefs['proxy_host']

    Dict['proxy_username'] = Prefs['proxy_username']
    Dict['proxy_password'] = Prefs['proxy_password']

    # Store current language
    Dict['language'] = Prefs['language']

    # Start plugin
    m = Main()
    m.start()
コード例 #3
0
def Start():
    ObjectContainer.art = R(ART)
    ObjectContainer.title1 = NAME
    DirectoryObject.thumb = R(ICON)
    DirectoryObject.art = R(ART)
    PopupDirectoryObject.thumb = R(ICON)
    PopupDirectoryObject.art = R(ART)

    if not Singleton.acquire():
        log.warn('Unable to acquire plugin instance')

    # Complete logger initialization
    LoggerManager.setup(storage=True)

    # Start plugin
    m = Main()
    m.start()
コード例 #4
0
try:
    Log.Debug('Using locale: %s', locale.setlocale(locale.LC_ALL, ''))
except Exception, ex:
    Log.Warn('Unable to update locale: %s', ex)
# ------------------------------------------------
# FS Migrator
# ------------------------------------------------
from fs_migrator import FSMigrator

FSMigrator.run()
# ------------------------------------------------
# Logger
# ------------------------------------------------
from plugin.core.logger import LoggerManager

LoggerManager.setup(storage=False)
# ------------------------------------------------
# Libraries
# ------------------------------------------------
from plugin.core.libraries import LibrariesManager

LibrariesManager.setup(cache=True)
LibrariesManager.test()
# ------------------------------------------------
# Modules
# ------------------------------------------------
import core
import interface
# ------------------------------------------------
# Handlers
# ------------------------------------------------
コード例 #5
0
os.environ['LIBRARY_DB'] = os.path.join(Environment.path.plugin_support,
                                        'Databases',
                                        'com.plexapp.plugins.library.db')

# ------------------------------------------------
# FS Migrator
# ------------------------------------------------
from fs_migrator import FSMigrator

FSMigrator.run()
# ------------------------------------------------
# Logger
# ------------------------------------------------
from plugin.core.logger import LoggerManager

LoggerManager.setup(storage=False)
# ------------------------------------------------
# Language
# ------------------------------------------------
Environment.setup_locale()
Environment.setup_translation()
# ------------------------------------------------
# Libraries
# ------------------------------------------------
from plugin.core.libraries.manager import LibrariesManager

LibrariesManager.setup(cache=True)
LibrariesManager.test()
# ------------------------------------------------
# Warnings
# ------------------------------------------------