当前位置: 首页>>代码示例>>Python>>正文


Python xbmcgui.DialogProgressBG方法代码示例

本文整理汇总了Python中xbmcgui.DialogProgressBG方法的典型用法代码示例。如果您正苦于以下问题:Python xbmcgui.DialogProgressBG方法的具体用法?Python xbmcgui.DialogProgressBG怎么用?Python xbmcgui.DialogProgressBG使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在xbmcgui的用法示例。


在下文中一共展示了xbmcgui.DialogProgressBG方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: set_progress_dialog

# 需要导入模块: import xbmcgui [as 别名]
# 或者: from xbmcgui import DialogProgressBG [as 别名]
def set_progress_dialog(self):

        queue_size = self.worker_queue_size()
        try:
            self.progress_percent = int((float(self.total_updates - queue_size) / float(self.total_updates))*100)
        except Exception:
            self.progress_percent = 0

        LOG.debug("--[ pdialog (%s/%s) ]", queue_size, self.total_updates)

        if self.total_updates < int(settings('syncProgress') or 50):
            return

        if self.progress_updates is None:
            LOG.info("-->[ pdialog ]")
            self.progress_updates = xbmcgui.DialogProgressBG()
            self.progress_updates.create(_('addon_name'), _(33178)) 
开发者ID:MediaBrowser,项目名称:plugin.video.emby,代码行数:19,代码来源:library.py

示例2: __create_dialog

# 需要导入模块: import xbmcgui [as 别名]
# 或者: from xbmcgui import DialogProgressBG [as 别名]
def __create_dialog(self, line1, line2, line3):
        if self.background:
            pd = xbmcgui.DialogProgressBG()
            msg = line1 + line2 + line3
            pd.create(self.heading, msg)
        else:
            if xbmc.getCondVisibility('Window.IsVisible(progressdialog)'):
                pd = CustomProgressDialog.ProgressDialog()
            else:
                pd = xbmcgui.DialogProgress()
            if six.PY2:
                pd.create(self.heading, line1, line2, line3)
            else:
                pd.create(self.heading,
                          line1 + '\n'
                          + line2 + '\n'
                          + line3)
        return pd 
开发者ID:tvaddonsco,项目名称:script.module.urlresolver,代码行数:20,代码来源:kodi.py

示例3: __init__

# 需要导入模块: import xbmcgui [as 别名]
# 或者: from xbmcgui import DialogProgressBG [as 别名]
def __init__(self, monitor=None):
        self.monitor = monitor or xbmc.Monitor()
        self.language = None
        self.autolanguages = None
        self.progress = xbmcgui.DialogProgressBG()
        self.visible = False
        self.freshstart = "0"
        self.processed = ProcessedItems()
        self.gatherer = None
        self.downloader = None
        self.chunkcount = 1
        self.currentchunk = 0
        self.debug = False
        self.localmode = False
        settings.update_settings()
        mediatypes.update_settings() 
开发者ID:rmrector,项目名称:script.artwork.beef,代码行数:18,代码来源:artworkprocessor.py

示例4: create

# 需要导入模块: import xbmcgui [as 别名]
# 或者: from xbmcgui import DialogProgressBG [as 别名]
def create(self, heading=None, message=None):
        """
        Shows a progress dialog to the user

        Args:
            heading(str|int): Heading text of the progress dialog.
                Can be a string or a numerical id to a localized text.

            message(str|int): Text of the progress dialog.
                Can be a string or a numerical id to a localized text.
        """
        heading = self.language(heading) if isinstance(
            heading, int) else heading
        message = self.language(message) if isinstance(
            message, int) else message
        if self.pgdialog is None:
            self.pgdialog = xbmcgui.DialogProgressBG()
            self.pgdialog.create(heading, message)
        else:
            self.pgdialog.update(0, heading, message) 
开发者ID:mediathekview,项目名称:plugin.video.mediathekview,代码行数:22,代码来源:kodiui.py

示例5: bg_progress_dialog

# 需要导入模块: import xbmcgui [as 别名]
# 或者: from xbmcgui import DialogProgressBG [as 别名]
def bg_progress_dialog():
    """Show Kodi's Background Progress dialog"""
    return DialogProgressBG() 
开发者ID:emilsvennesson,项目名称:script.module.inputstreamhelper,代码行数:5,代码来源:kodiutils.py

示例6: progress

# 需要导入模块: import xbmcgui [as 别名]
# 或者: from xbmcgui import DialogProgressBG [as 别名]
def progress(message=None):

    ''' Will start and close the progress dialog.
    '''
    def decorator(func):
        def wrapper(self, item=None, *args, **kwargs):

            dialog = xbmcgui.DialogProgressBG()

            if item and type(item) == dict:

                dialog.create(_('addon_name'), "%s %s" % (_('gathering'), item['Name']))
                LOG.info("Processing %s: %s", item['Name'], item['Id'])
            else:
                dialog.create(_('addon_name'), message)
                LOG.info("Processing %s", message)

            if item:
                args = (item,) + args

            try:
                result = func(self, dialog=dialog, *args, **kwargs)
                dialog.close()
            except Exception:
                dialog.close()

                raise

            return result

        return wrapper
    return decorator 
开发者ID:MediaBrowser,项目名称:plugin.video.emby,代码行数:34,代码来源:wrapper.py

示例7: __create_dialog

# 需要导入模块: import xbmcgui [as 别名]
# 或者: from xbmcgui import DialogProgressBG [as 别名]
def __create_dialog(self, line1, line2, line3):
        if self.background:
            pd = xbmcgui.DialogProgressBG()
            msg = line1 + line2 + line3
            pd.create(self.heading, msg)
        else:
            pd = xbmcgui.DialogProgress()
            pd.create(self.heading, line1, line2, line3)
        return pd 
开发者ID:bugatsinho,项目名称:bugatsinho.github.io,代码行数:11,代码来源:control.py

示例8: dialog_progress_bg

# 需要导入模块: import xbmcgui [as 别名]
# 或者: from xbmcgui import DialogProgressBG [as 别名]
def dialog_progress_bg(heading, message=""):
    try:
        dialog = xbmcgui.DialogProgressBG()
        dialog.create(heading, message)
        return dialog
    except:
        return dialog_progress(heading, message) 
开发者ID:alfa-addon,项目名称:addon,代码行数:9,代码来源:platformtools.py

示例9: DialogProgressBG_Create

# 需要导入模块: import xbmcgui [as 别名]
# 或者: from xbmcgui import DialogProgressBG [as 别名]
def DialogProgressBG_Create(self, title, message, *args):
        dialog = xbmcgui.DialogProgressBG()
        dialogId = id(dialog)
        self._objects[dialogId] = dialog
        if args and isinstance(args[0], list):
            self._objects["%s-i18n" % dialogId] = {}
            for translation in args[0]:
                self._objects["%s-i18n" % dialogId][translation] = getLocalizedLabel(translation)
        dialog.create(title, getLocalizedLabel(message))
        return dialogId 
开发者ID:alfa-addon,项目名称:addon,代码行数:12,代码来源:rpc.py

示例10: playLevel

# 需要导入模块: import xbmcgui [as 别名]
# 或者: from xbmcgui import DialogProgressBG [as 别名]
def playLevel():
	
	dp = xbmcgui.DialogProgressBG();
	dp.create('IPTV', 'Loading ...');
	
	title 	= args['title'][0];
	cmd 	= args['cmd'][0];
	tmp 	= args['tmp'][0];
	genre_name 	= args['genre_name'][0];
	logo_url 	= args['logo_url'][0];
	
	
	try:
		if genre_name != 'VoD':
			url = load_channels.retriveUrl(portal['mac'], portal['url'], portal['serial'], cmd, tmp);
		else:
			url = load_channels.retriveVoD(portal['mac'], portal['url'], portal['serial'], cmd);

	
	except Exception as e:
		dp.close();
		xbmcgui.Dialog().notification(addonname, str(e), xbmcgui.NOTIFICATION_ERROR );
		return;
	
	dp.update(80);
	
	title = title.decode("utf-8");
	
	title += ' (' + portal['name'] + ')';
	
	li = xbmcgui.ListItem(title, iconImage=logo_url);
	li.setInfo('video', {'Title': title, 'Genre': genre_name});
	xbmc.Player().play(item=url, listitem=li);
	
	dp.update(100);
	
	dp.close(); 
开发者ID:esxbr,项目名称:plugin.video.stalker,代码行数:39,代码来源:addon.py

示例11: create

# 需要导入模块: import xbmcgui [as 别名]
# 或者: from xbmcgui import DialogProgressBG [as 别名]
def create(self, heading, message=None):
        if self.created:
            self.update(heading=heading, message=message)
        else:
            super(DialogProgressBG, self).create(heading, message)
            self.created = True 
开发者ID:cguZZman,项目名称:script.module.clouddrive.common,代码行数:8,代码来源:dialog.py

示例12: close

# 需要导入模块: import xbmcgui [as 别名]
# 或者: from xbmcgui import DialogProgressBG [as 别名]
def close(self):
        if self.created:
            super(DialogProgressBG, self).close()
            self.created = False 
开发者ID:cguZZman,项目名称:script.module.clouddrive.common,代码行数:6,代码来源:dialog.py

示例13: update

# 需要导入模块: import xbmcgui [as 别名]
# 或者: from xbmcgui import DialogProgressBG [as 别名]
def update(self, percent=0, heading=None, message=None):
        if not self.created:
            if not heading: heading = self._default_heading
            self.create(heading=heading, message=message)
        if percent < 0: percent = 0
        if percent > 100: percent = 100
        super(DialogProgressBG, self).update(percent=percent, heading=heading, message=message) 
开发者ID:cguZZman,项目名称:script.module.clouddrive.common,代码行数:9,代码来源:dialog.py

示例14: show_busydialog

# 需要导入模块: import xbmcgui [as 别名]
# 或者: from xbmcgui import DialogProgressBG [as 别名]
def show_busydialog(self, headline='', textline=''):
        #self.progressWindow = xbmcgui.DialogProgress()
        #self.progressWindow.create(heading=_T(30267), line1=headline, line2=textline)
        # or:
        self.progressWindow = xbmcgui.DialogProgressBG()
        self.progressWindow.create(heading=headline, message=textline)
        self.progressWindow.update(percent=50)
        #if KODI_VERSION >= (18, 0):
        #    xbmc.executebuiltin('ActivateWindow(busydialognocancel)')
        #else:
        #    xbmc.executebuiltin('ActivateWindow(busydialog)') 
开发者ID:arnesongit,项目名称:plugin.audio.tidal2,代码行数:13,代码来源:koditidal2.py

示例15: __init__

# 需要导入模块: import xbmcgui [as 别名]
# 或者: from xbmcgui import DialogProgressBG [as 别名]
def __init__(self, heading, text):
        AbstractProgressDialog.__init__(self, 100)
        self._dialog = xbmcgui.DialogProgressBG()
        self._dialog.create(heading, text)

        # simple reset because KODI won't do it :(
        self._position = 1
        self.update(steps=-1)
        pass 
开发者ID:Kolifanes,项目名称:plugin.video.youtube,代码行数:11,代码来源:xbmc_progress_dialog_bg.py


注:本文中的xbmcgui.DialogProgressBG方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。