def _update_window_properties(self, source):
        debrid_provider = source.get("debrid_provider",
                                     "None").replace("_", " ")
        if "size" in source and source["size"] != "Variable":
            self.setProperty("source_size",
                             tools.source_size_display(source["size"]))

        self.setProperty("release_title",
                         g.display_string(source["release_title"]))
        self.setProperty("debrid_provider", debrid_provider)
        self.setProperty("source_provider", source["provider"])
        self.setProperty("source_resolution", source["quality"])
        self.setProperty("source_info", " ".join(source["info"]))
        self.setProperty("source_type", source["type"])
    def shows_search(self, query=None):
        if not query:
            k = xbmc.Keyboard("", g.get_language_string(30013))
            k.doModal()
            query = k.getText() if k.isConfirmed() else None
            del k
            if not query:
                g.cancel_directory()
                return

        query = g.decode_py2(query)
        if g.get_bool_setting("searchHistory"):
            SearchHistory().add_search_history("tvshow", query)
        query = g.deaccent_string(g.display_string(query))
        self.shows_search_results(query)
Beispiel #3
0
    def _handle_episode_title_appending(name, item, title_append_style):
        if title_append_style == "1":
            name = "{}x{} {}".format(
                g.display_string(item["info"]["season"]).zfill(2),
                g.display_string(item["info"]["episode"]).zfill(2),
                g.display_string(name),
            )

        elif title_append_style == "2":
            name = "{}: {}".format(g.color_string(item["info"]["tvshowtitle"]),
                                   g.display_string(name))

        elif title_append_style == "3":
            name = "{}: {}x{} {}".format(
                g.color_string(item["info"]["tvshowtitle"]),
                g.display_string(item["info"]["season"]).zfill(2),
                g.display_string(item["info"]["episode"]).zfill(2),
                g.display_string(name),
            )

        return name