navigation.py 文件源码

python
阅读 22 收藏 0 点赞 0 评论 0

项目:plugin.video.skygo 作者: trummerjo 项目源码 文件源码
def showParentalSettings():
    fsk_list = ['Deaktiviert', '0', '6', '12', '16', '18']
    dlg = xbmcgui.Dialog()
    code = dlg.input('PIN Code', type=xbmcgui.INPUT_NUMERIC)
    if code == xbmcaddon.Addon().getSetting('password'):
        idx = dlg.select('Wähle maximale FSK Alterstufe', fsk_list)
        if idx >= 0:
            fsk_code = fsk_list[idx]
            if fsk_code == 'Deaktiviert':
                xbmcaddon.Addon().setSetting('js_maxrating', '-1')
            else:
                xbmcaddon.Addon().setSetting('js_maxrating', fsk_list[idx])
        if idx > 0:
            if dlg.yesno('Jugendschutz', 'Sollen Inhalte mit einer Alterseinstufung über ', 'FSK ' + fsk_list[idx] + ' angezeigt werden?'):
                xbmcaddon.Addon().setSetting('js_showall', 'true')
            else:
                xbmcaddon.Addon().setSetting('js_showall', 'false')
    else:
        xbmcgui.Dialog().notification('SkyGo - Jugendschutz', 'Fehlerhafte PIN', xbmcgui.NOTIFICATION_ERROR, 2000, True)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号