Esempio n. 1
0
 def close(self, cancel=False):
     if self._dialog:
         self._dialog.close()
         self._dialog = None
         xbmc.executebuiltin("Container.Refresh")
     if cancel:
         nav_internal_link("/")
Esempio n. 2
0
def search(type=None):
    kbd = xbmc.Keyboard()
    kbd.setHeading("Поиск")
    kbd.doModal()
    if kbd.isConfirmed():
        title = kbd.getText()
        if len(title.decode("utf-8")) >= 3:
            nav_internal_link("items", title=title, type=type)
        else:
            notice("Введите больше символов для поиска", "Поиск")
Esempio n. 3
0
def search(page=None, type=None):
    kbd = xbmc.Keyboard()
    kbd.setDefault("")
    kbd.setHeading("Поиск")
    kbd.doModal()
    out = ""
    if kbd.isConfirmed():
        out = kbd.getText()
        if len(out.decode("utf-8")) >= 3:
            if "page" is not None:
                page = 1
            nav_internal_link("items", page=page, title=out, type=type)
        else:
            notice("Введите больше символов для поиска", "Поиск")
Esempio n. 4
0
 def do_login(self):
     xbmc.log("{}: No access_token. Show modal auth".format(__plugin__))
     status, resp = self.get_device_code()
     if status == self.ERROR:
         notice("Код ответа сервера {}".format(resp["status"]),
                heading="Неизвестная ошибка")
         nav_internal_link("/")
         return
     self.window.show("\n".join([
         "Откройте [B]{}[/B]".format(
             resp["verification_uri"].encode("utf-8")),
         "и введите следующий код: [B]{}[/B]".format(
             resp["user_code"].encode("utf-8"))
     ]))
     self.verify_device_code(int(resp["interval"]))
     xbmc.log("{}: Close modal auth".format(__plugin__))
Esempio n. 5
0
 def close(self, cancel=False):
     if self._dialog:
         self._dialog.close()
         self._dialog = None
     if cancel:
         nav_internal_link("/")