Пример #1
0
    def __init__(self, session, items, service=None):
        Screen.__init__(self, session)
        self.skinName = SkinTools.appendResolution("AdvancedMovieSelectionDownload")
        self.onShow.append(self.selectionChanged)
        self.service = service
        self["logo"] = Pixmap()
        self["info"] = Label()
        self["title"] = Label()
        self["poster"] = Pixmap()
        self["poster"].hide()
        self["description"] = ScrollLabel()
        self["key_red"] = Button(_("Cancel"))
        self["key_green"] = Button("")
        self["key_yellow"] = Button("")
        self["key_yellow"] = Label(_("Manual search"))
        if self.service is not None:
            self["key_green"] = Label(_("Save infos/cover"))
        else:
            self["key_green"] = Label(_("Background"))
            self["key_yellow"].hide()

        self["ActionsMap"] = ActionMap(["SetupActions", "ColorActions"],
         {
          "ok": self.titleSelected,
          "green": self.titleSelected,
          "red": self.__cancel,
          "yellow": self.editTitle,
          "cancel": self.__cancel,
          "left": self.scrollLabelPageUp,
          "right": self.scrollLabelPageDown
          }, -1)
        self.onShown.append(self.setWindowTitle)

        self.l = []
        self["list"] = MenuList(self.l)
        self["list"].onSelectionChanged.append(self.selectionChanged)

        self.picload = ePicLoad()
        self.picload.PictureData.get().append(self.paintPosterPixmap)
        self.refreshTimer = eTimer()
        self.refreshTimer.callback.append(self.refresh)

        self.tmdb3 = tmdb.init_tmdb3()

        if self.service is not None:
            global movie_title
            movie_title = ServiceCenter.getInstance().info(self.service).getName(self.service).encode("utf-8").split(" - ")[0].strip()
            self.refreshTimer.start(1, True)
            return

        global fetchingMovies, this_session, is_hidden
        if fetchingMovies is None:
            fetchingMovies = FetchingMovies(items)
        else:
            fetchingMovies.cancel = False
        self.progressTimer = eTimer()
        self.progressTimer.callback.append(self.updateProgress)
        self.progressTimer.start(250, False)
        this_session = session
        is_hidden = False
Пример #2
0
    def __init__(self, session, items, service=None):
        Screen.__init__(self, session)
        self.skinName = SkinTools.appendResolution("AdvancedMovieSelectionDownload")
        self.onShow.append(self.selectionChanged)
        self.service = service
        self["logo"] = Pixmap()  
        self["info"] = Label()
        self["title"] = Label()
        self["poster"] = Pixmap()
        self["poster"].hide()
        self["description"] = ScrollLabel()
        self["key_red"] = Button(_("Cancel"))
        self["key_green"] = Button("")
        self["key_yellow"] = Button("")
        self["key_yellow"] = Label(_("Manual search"))
        if self.service is not None:
            self["key_green"] = Label(_("Save infos/cover"))
        else:
            self["key_green"] = Label(_("Background"))
            self["key_yellow"].hide()

        self["ActionsMap"] = ActionMap(["SetupActions", "ColorActions"],
         {
          "ok": self.titleSelected,
          "green": self.titleSelected,
          "red": self.__cancel,
          "yellow": self.editTitle,
          "cancel": self.__cancel,
          "left": self.scrollLabelPageUp,
          "right": self.scrollLabelPageDown
          }, -1)
        self.onShown.append(self.setWindowTitle)
      
        self.l = []
        self["list"] = MenuList(self.l)
        self["list"].onSelectionChanged.append(self.selectionChanged)
        
        self.picload = ePicLoad()
        self.picload.PictureData.get().append(self.paintPosterPixmap)
        self.refreshTimer = eTimer()
        self.refreshTimer.callback.append(self.refresh)

        self.tmdb3 = tmdb.init_tmdb3()

        if self.service is not None:
            global movie_title
            movie_title = ServiceCenter.getInstance().info(self.service).getName(self.service).encode("utf-8").split(" - ")[0].strip()
            self.refreshTimer.start(1, True)
            return
        
        global fetchingMovies, this_session, is_hidden
        if fetchingMovies is None:
            fetchingMovies = FetchingMovies(items)
        else:
            fetchingMovies.cancel = False
        self.progressTimer = eTimer()
        self.progressTimer.callback.append(self.updateProgress)
        self.progressTimer.start(250, False)
        this_session = session
        is_hidden = False
Пример #3
0
 def __init__(self):
     from timer import eTimer
     self.count = 0
     self.__showThreadsTimer = eTimer()
     self.__showThreadsTimer.callback.append(self.__showThreads)
     self.__showThreadsTimer.start(1000, False)