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


Python xbmcgui.INPUT_NUMERIC属性代码示例

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


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

示例1: record_and_play

# 需要导入模块: import xbmcgui [as 别名]
# 或者: from xbmcgui import INPUT_NUMERIC [as 别名]
def record_and_play(channelname):
    #channelid = channelid.decode("utf8")
    channelname = channelname.decode("utf8")

    utcnow = datetime.utcnow()
    ts = time.time()
    utc_offset = total_seconds(datetime.fromtimestamp(ts) - datetime.utcfromtimestamp(ts))

    start = utcnow - timedelta(seconds=utc_offset)

    hours = xbmcgui.Dialog().input("Hours",type=xbmcgui.INPUT_NUMERIC,defaultt="4")
    #log(hours)

    stop = utcnow - timedelta(seconds=utc_offset) + timedelta(hours=int(hours))

    do_refresh = False
    watch = False
    remind = False
    channelid = None
    threading.Thread(target=record_once_thread,args=[None, do_refresh, watch, remind, channelid, channelname, start, stop, True, None]).start()
    time.sleep(5)

    return recordings() 
开发者ID:primaeval,项目名称:plugin.video.iptv.recorder,代码行数:25,代码来源:main.py

示例2: get_user_input_id

# 需要导入模块: import xbmcgui [as 别名]
# 或者: from xbmcgui import INPUT_NUMERIC [as 别名]
def get_user_input_id():
    dialog = xbmcgui.Dialog()
    kp_id = None
    result = dialog.input('Input Kinopoisk ID', '', type = xbmcgui.INPUT_NUMERIC)
    if result:
        kp_id = result
    return kp_id 
开发者ID:dandygithub,项目名称:kodi,代码行数:9,代码来源:plugin.py

示例3: on_numeric_input

# 需要导入模块: import xbmcgui [as 别名]
# 或者: from xbmcgui import INPUT_NUMERIC [as 别名]
def on_numeric_input(self, title, default=''):
        dialog = xbmcgui.Dialog()
        result = dialog.input(title, str(default), type=xbmcgui.INPUT_NUMERIC)
        if result:
            return True, int(result)

        return False, None 
开发者ID:Kolifanes,项目名称:plugin.video.youtube,代码行数:9,代码来源:xbmc_context_ui.py

示例4: dialog_input

# 需要导入模块: import xbmcgui [as 别名]
# 或者: from xbmcgui import INPUT_NUMERIC [as 别名]
def dialog_input(heading, default='', type=xbmcgui.INPUT_ALPHANUM, option=0, delay=0):
	if type not in [xbmcgui.INPUT_ALPHANUM, xbmcgui.INPUT_NUMERIC, xbmcgui.INPUT_DATE, xbmcgui.INPUT_TIME, xbmcgui.INPUT_IPADDRESS, xbmcgui.INPUT_PASSWORD]: type = xbmcgui.INPUT_ALPHANUM
	dialog = xbmcgui.Dialog()
	return dialog.input(heading, default, type, option, delay) 
开发者ID:tvaddonsco,项目名称:plugin.git.browser,代码行数:6,代码来源:ui.py

示例5: show_adult_pin_dialog

# 需要导入模块: import xbmcgui [as 别名]
# 或者: from xbmcgui import INPUT_NUMERIC [as 别名]
def show_adult_pin_dialog(self):
        """
        Asks the user for the adult pin

        :returns: int - 4 digit adult pin needed for adult movies
        """
        dlg = xbmcgui.Dialog()
        dialog = dlg.input(
            heading=self.get_local_string(string_id=30002),
            type=xbmcgui.INPUT_NUMERIC)
        return dialog 
开发者ID:asciidisco,项目名称:plugin.video.netflix,代码行数:13,代码来源:Dialogs.py

示例6: set_userdiscover_method_property

# 需要导入模块: import xbmcgui [as 别名]
# 或者: from xbmcgui import INPUT_NUMERIC [as 别名]
def set_userdiscover_method_property(self):
        method = self.params.get('method')

        # Set Input Method
        affix = ''
        header = 'Search for '
        usedetails = False
        label = self.params.get('label')
        tmdbtype = self.params.get('type')
        inputtype = xbmcgui.INPUT_ALPHANUM
        if any(i in method for i in ['year', 'vote_', '_runtime', '_networks']):
            header = self.addon.getLocalizedString(32114) + ' '
            inputtype = xbmcgui.INPUT_NUMERIC
        elif '_date' in method:
            header = self.addon.getLocalizedString(32114) + ' '
            affix = ' YYYY-MM-DD\n' + self.addon.getLocalizedString(32113)
        elif '_genres' in method:
            label = xbmc.getLocalizedString(515)
            tmdbtype = 'genre'
        elif '_companies' in method:
            label = self.addon.getLocalizedString(32115)
            tmdbtype = 'company'
        elif '_networks' in method:
            label = self.addon.getLocalizedString(32116)
            tmdbtype = 'company'
        elif '_keywords' in method:
            label = self.addon.getLocalizedString(32117)
            tmdbtype = 'keyword'
        elif any(i in method for i in ['_cast', '_crew', '_people']):
            label = self.addon.getLocalizedString(32118)
            tmdbtype = 'person'
            usedetails = True
        header = '{0}{1}{2}'.format(header, label, affix)
        old_value = self.get_userdiscover_prop(method) or None
        old_label = self.get_userdiscover_prop(method, 'Label') or None

        # Route Method
        if method == 'with_separator':
            self.set_userdiscover_separator_property()
        elif '_genres' in method:
            self.set_userdiscover_genre_property()
        elif 'with_release_type' in method:
            self.set_userdiscover_selectlist_properties(constants.USER_DISCOVER_RELEASETYPES, header=self.addon.getLocalizedString(32119))
        elif 'region' in method:
            self.set_userdiscover_selectlist_properties(constants.USER_DISCOVER_REGIONS, header=self.addon.getLocalizedString(32120), multiselect=False)
        elif 'with_original_language' in method:
            self.set_userdiscover_selectlist_properties(constants.USER_DISCOVER_LANGUAGES, header=self.addon.getLocalizedString(32159), multiselect=False)
        elif 'with_runtime' not in method and 'with_networks' not in method and any(i in method for i in ['with_', 'without_']):
            self.add_userdiscover_method_property(header, tmdbtype, usedetails, old_label=old_label, old_value=old_value)
        else:
            self.new_property_label = self.new_property_value = utils.try_decode_string(
                xbmcgui.Dialog().input(header, type=inputtype, defaultt=old_value)) 
开发者ID:jurialmunkey,项目名称:plugin.video.themoviedb.helper,代码行数:54,代码来源:container.py


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