Exemplo n.º 1
0
 def __init__(self, session, event, ref, callback=None, similarEPGCB=None):
     Screen.__init__(self, session)
     self.skinName = ["AdvancedMovieSelectionEventView"]
     if config.AdvancedMovieSelection.show_backdrop.value:
         SkinTools.insertBackdrop(self.skinName)
     EventViewBase.__init__(self, event, ref, callback, similarEPGCB)
     MoviePreview.__init__(self, session)
Exemplo n.º 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
Exemplo n.º 3
0
 def __init__(self, session):
     Screen.__init__(self, session)
     self.skinName = SkinTools.appendResolution("AdvancedMovieSelection_ClientSetup_")
     self.staticIP = getIpAddress('eth0')
     self.session = session
     self["key_red"] = Button(_("Close"))
     self["key_green"] = StaticText("")
     self["key_yellow"] = StaticText("")
     self["actions"] = ActionMap(["WizardActions", "MenuActions", "ShortcutActions", "EPGSelectActions"],
         {
              "ok": self.keySave,
              "back": self.keyCancel,
              "red": self.keyCancel,
              "green": self.keySave,
              "yellow": self.keyYellow,
              "up": self.keyUp,
              "down": self.keyDown,
              "nextBouquet": self.keyBouquetUp,
              "prevBouquet": self.keyBouquetDown,
          }, -1)
     self["status"] = StaticText("")
     self["help"] = StaticText("")
     self["green_button"] = Pixmap()
     self["yellow_button"] = Pixmap()
     self["green_button"].hide()
     self["yellow_button"].hide()
     self["clienttxt"] = StaticText("")
     self["list"] = ClientSetupList(self.staticIP)
     self.list = self["list"]
     self.list.reload()
     self.configList = []
     ConfigListScreen.__init__(self, self.configList, session=self.session)
     if not self.showHelp in self["config"].onSelectionChanged:
         self["config"].onSelectionChanged.append(self.showHelp)
     self.onShown.append(self.setWindowTitle)
Exemplo n.º 4
0
 def __init__(self, session):
     Screen.__init__(self, session)
     self.skinName = SkinTools.appendResolution(
         "AdvancedMovieSelectionAbout")
     self["aboutActions"] = ActionMap(
         ["ShortcutActions", "WizardActions", "InfobarEPGActions"], {
             "red": self.close,
             "green": self.showchanges,
             "back": self.close,
             "ok": self.close,
         }, -1)
     v = _("Version:")
     b = _("Branch:")
     info = "%s %s.r%s, %s\n  %s %s" % (
         v, Version.__version__, Version.__revision__, Version.__date__, b,
         Version.__branch__)
     self["version"] = StaticText(info)
     self["author"] = StaticText(_("Developer:\n  JackDaniel, cmikula"))
     self["translation"] = StaticText(
         _("Thanks for translation to:\n") + '  nl=Bschaar', 'it=mikark')
     self["license"] = StaticText(
         _("This plugin may only executed on hardware which is licensed by Dream Multimedia GmbH."
           ))
     self["thanks"] = StaticText(
         _("Thanks to all other for help and so many very good code."))
     self["key_red"] = StaticText(_("Close"))
     self["key_green"] = StaticText(_("Show changes"))
     self["red"] = Pixmap()
     self["green"] = Pixmap()
     self.onLayoutFinish.append(self.setWindowTitle)
Exemplo n.º 5
0
 def __init__(self, session):
     Screen.__init__(self, session)
     self.skinName = SkinTools.appendResolution(
         "AdvancedMovieSelectionAboutDetails_")
     self["aboutActions"] = ActionMap(
         [
             "ShortcutActions", "WizardActions", "InfobarEPGActions",
             "EPGSelectActions"
         ], {
             "red": self.close,
             "back": self.close,
             "nextBouquet": self.pageUp,
             "nextBouquet": self.pageUp,
             "prevBouquet": self.pageDown,
             "prevBouquet": self.pageDown,
         }, -1)
     self["key_red"] = StaticText()
     self["red"] = Pixmap()
     self["red"].hide()
     self["bouquet+"] = Pixmap()
     self["bouquet+"].hide()
     self["bouquet-"] = Pixmap()
     self["bouquet-"].hide()
     self["version_list"] = VersionList()
     self["version_list"].hide()
     self["details"] = ScrollLabel()
     self["details"].hide()
     self.onShown.append(self.setWindowTitle)
Exemplo n.º 6
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
Exemplo n.º 7
0
 def __init__(self, session, tags, txt=None, parent=None):
     Screen.__init__(self, session, parent=parent)
     self.skinName = SkinTools.appendResolution("AdvancedMovieSelectionTagEditor")
     self["key_red"] = StaticText(_("Cancel"))
     self["key_green"] = StaticText(_("Save/Close"))
     self["key_yellow"] = StaticText(_("Create new Tag"))
     self["key_blue"] = StaticText("")
     self["key_blue"] = StaticText(_("Load Tag(s) from movies"))
     self["info"] = StaticText(_("Use the OK Button for the selection."))
     self["list"] = SelectionList()
     self.TimerEntry = TimerEntry
     allTags = self.loadTagsFile()
     self.joinTags(allTags, tags)
     self.updateMenuList(allTags, tags)
     self.ghostlist = tags[:]
     self.ghosttags = allTags[:]
     self.origtags = allTags[:]
     self.tags = allTags
     self["actions"] = ActionMap(["OkCancelActions", "ColorActions", "MenuActions"],
     {
         "ok": self["list"].toggleSelection,
         "cancel": self.cancel,
         "red": self.cancel,
         "green": self.accept,
         "yellow": self.addCustom,
         "blue": self.loadFromHdd,
         "menu": self.showMenu
     }, -1)
     self.defaulttaglist(tags)
     self.setCustomTitle(tags)
Exemplo n.º 8
0
 def __init__(self, session, tags, txt=None, parent=None):
     Screen.__init__(self, session, parent=parent)
     self.skinName = SkinTools.appendResolution("AdvancedMovieSelectionTagEditor")
     self["key_red"] = StaticText(_("Cancel"))
     self["key_green"] = StaticText(_("Save/Close"))
     self["key_yellow"] = StaticText(_("Create new Tag"))
     self["key_blue"] = StaticText("")
     self["key_blue"] = StaticText(_("Load Tag(s) from movies"))
     self["info"] = StaticText(_("Use the OK Button for the selection."))
     self["list"] = SelectionList()
     self.TimerEntry = TimerEntry
     allTags = self.loadTagsFile()
     self.joinTags(allTags, tags)
     self.updateMenuList(allTags, tags)
     self.ghostlist = tags[:]
     self.ghosttags = allTags[:]
     self.origtags = allTags[:]
     self.tags = allTags
     self["actions"] = ActionMap(["OkCancelActions", "ColorActions", "MenuActions"],
     {
         "ok": self["list"].toggleSelection,
         "cancel": self.cancel,
         "red": self.cancel,
         "green": self.accept,
         "yellow": self.addCustom,
         "blue": self.loadFromHdd,
         "menu": self.showMenu
     }, -1)
     self.defaulttaglist(tags)
     self.setCustomTitle(tags)
Exemplo n.º 9
0
 def __init__(self, session, service):
     Screen.__init__(self, session)
     self.skinName = SkinTools.appendResolution(
         "AdvancedMovieSelection_Rename_")
     self.service = service
     self.movieConfig = MovieConfig()
     self.is_vdir = isinstance(service, eServiceReferenceVDir)
     self.is_dir = service.flags & eServiceReference.mustDescent
     serviceHandler = ServiceCenter.getInstance()
     info = serviceHandler.info(service)
     path = service.getPath()
     if self.is_vdir:
         parts = path.split("/")
         if len(parts) > 2:
             dirName = parts[-3] + "/" + parts[-2]
         else:
             dirName = parts[-2]
         self.original_file = dirName
     elif self.is_dir:
         self.original_file = service.getName()
     else:
         self.original_file = os.path.basename(os.path.splitext(path)[0])
     if self.is_vdir:
         self.original_name = self.movieConfig.getRenamedName(
             service.getName())
     else:
         self.original_name = info.getName(service)
     self.original_desc = info.getInfoString(
         service, iServiceInformation.sDescription)
     self.input_file = ConfigText(default=self.original_file,
                                  fixed_size=False,
                                  visible_width=82)
     self.input_title = ConfigText(default=self.original_name,
                                   fixed_size=False,
                                   visible_width=82)
     self.input_descr = ConfigText(default=self.original_desc,
                                   fixed_size=False,
                                   visible_width=82)
     self["key_green"] = StaticText(_("Save"))
     self["key_red"] = StaticText(_("Cancel"))
     self["actions"] = ActionMap(["SetupActions"], {
         "ok": self.keyGo,
         "save": self.keyGo,
         "cancel": self.keyCancel,
     }, -2)
     self.list = []
     ConfigListScreen.__init__(self, self.list, session=self.session)
     self.createSetup()
     self["Path"] = Label(
         _("Location:") + ' ' + os.path.dirname(os.path.splitext(path)[0]))
     self["HelpWindow"] = Pixmap()
     self.onLayoutFinish.append(self.setCustomTitle)
Exemplo n.º 10
0
    def __init__(self, session, instance, fwd):
        Screen.__init__(self, session)
        self.skinName = SkinTools.appendResolution("AdvancedMovieSelectionSeekbar")
        self.session = session
        self.infobarInstance = instance
        self.fwd = fwd
        if isinstance(session.current_dialog, MoviePlayer):
            self.dvd = False
        else:
            self.dvd = True
        self.percent = 0.0
        self.length = None
        service = session.nav.getCurrentService()
        if service:
            self.seek = service.seek()
            if self.seek:
                self.length = self.seek.getLength()
                position = self.seek.getPlayPosition()
                if self.length and position:
                    if int(position[1]) > 0:
                        self.percent = float(position[1]) * 100.0 / float(self.length[1])

        self.minuteInput = ConfigNumber(default=5)
        self.positionEntry = ConfigSelection(
            choices=[_("Use arrow left/right for position")], default=_("Use arrow left/right for position")
        )
        if self.fwd:
            txt = _("Jump x minutes forward (OK for seek):")
        else:
            txt = _("Jump x minutes back (OK for seek):")
        ConfigListScreen.__init__(
            self,
            [
                getConfigListEntry(txt, self.minuteInput),
                getConfigListEntry(_("Go manual to position (OK for seek):"), self.positionEntry),
            ],
        )
        self["cursor"] = MovingPixmap()
        self["time"] = Label()
        self["actions"] = ActionMap(["WizardActions"], {"back": self.exit}, -1)
        self.cursorTimer = eTimer()
        self.cursorTimer.callback.append(self.updateCursor)
        self.cursorTimer.start(200, False)
        self.onShown.append(self.setWindowTitle)
        self.onLayoutFinish.append(self.firstStart)
        self.firstime = True
        self.onExecBegin.append(self.__onExecBegin)
Exemplo n.º 11
0
    def __init__(self, session, instance, fwd):
        Screen.__init__(self, session)
        self.skinName = SkinTools.appendResolution(
            "AdvancedMovieSelectionSeekbar")
        self.session = session
        self.infobarInstance = instance
        self.fwd = fwd
        if isinstance(session.current_dialog, MoviePlayer):
            self.dvd = False
        else:
            self.dvd = True
        self.percent = 0.0
        self.length = None
        service = session.nav.getCurrentService()
        if service:
            self.seek = service.seek()
            if self.seek:
                self.length = self.seek.getLength()
                position = self.seek.getPlayPosition()
                if self.length and position:
                    if int(position[1]) > 0:
                        self.percent = float(position[1]) * 100.0 / float(
                            self.length[1])

        self.minuteInput = ConfigNumber(default=5)
        self.positionEntry = ConfigSelection(
            choices=[_("Use arrow left/right for position")],
            default=_("Use arrow left/right for position"))
        if self.fwd:
            txt = _("Jump x minutes forward (OK for seek):")
        else:
            txt = _("Jump x minutes back (OK for seek):")
        ConfigListScreen.__init__(self, [
            getConfigListEntry(txt, self.minuteInput),
            getConfigListEntry(_("Go manual to position (OK for seek):"),
                               self.positionEntry)
        ])
        self["cursor"] = MovingPixmap()
        self["time"] = Label()
        self["actions"] = ActionMap(["WizardActions"], {"back": self.exit}, -1)
        self.cursorTimer = eTimer()
        self.cursorTimer.callback.append(self.updateCursor)
        self.cursorTimer.start(200, False)
        self.onShown.append(self.setWindowTitle)
        self.onLayoutFinish.append(self.firstStart)
        self.firstime = True
        self.onExecBegin.append(self.__onExecBegin)
Exemplo n.º 12
0
 def __init__(self, session, service):
     Screen.__init__(self, session)
     self.skinName = SkinTools.appendResolution("AdvancedMovieSelection_Rename_")
     self.service = service
     self.movieConfig = MovieConfig()
     self.is_vdir = isinstance(service, eServiceReferenceVDir)
     self.is_dir = service.flags & eServiceReference.mustDescent
     serviceHandler = ServiceCenter.getInstance()
     info = serviceHandler.info(service)
     path = service.getPath()
     if self.is_vdir:
         parts = path.split("/")
         if len(parts) > 2:
             dirName = parts[-3] + "/" + parts[-2]
         else: 
             dirName = parts[-2]
         self.original_file = dirName 
     elif self.is_dir:
         self.original_file = service.getName()
     else:
         self.original_file = os.path.basename(os.path.splitext(path)[0])
     if self.is_vdir:
         self.original_name = self.movieConfig.getRenamedName(service.getName())
     else:
         self.original_name = info.getName(service)
     self.original_desc = info.getInfoString(service, iServiceInformation.sDescription)
     self.input_file = ConfigText(default=self.original_file, fixed_size=False, visible_width=82)
     self.input_title = ConfigText(default=self.original_name, fixed_size=False, visible_width=82)
     self.input_descr = ConfigText(default=self.original_desc, fixed_size=False, visible_width=82)
     self["key_green"] = StaticText(_("Save"))
     self["key_red"] = StaticText(_("Cancel"))
     self["actions"] = ActionMap(["SetupActions"],
     {
         "ok": self.keyGo,
         "save": self.keyGo,
         "cancel": self.keyCancel,
     }, -2)
     self.list = [ ]
     ConfigListScreen.__init__(self, self.list, session=self.session)
     self.createSetup()
     self["Path"] = Label(_("Location:") + ' ' + os.path.dirname(os.path.splitext(path)[0]))
     self["HelpWindow"] = Pixmap()
     self.onLayoutFinish.append(self.setCustomTitle)
Exemplo n.º 13
0
 def __init__(self, session):
     Screen.__init__(self, session)
     HelpableScreen.__init__(self)
     self.skinName = SkinTools.appendResolution(
         "AdvancedMovieSelectionTrash")
     self.delayTimer = eTimer()
     self.delayTimer.callback.append(self.updateHDDData)
     self.current_ref = eServiceReferenceTrash(
         config.movielist.last_videodir.value)
     self["ColorActions"] = HelpableActionMap(
         self, "ColorActions", {
             "red": (self.canDelete, _("Delete selected movie")),
             "green": (self.restore, _("Restore movie")),
             "yellow": (self.canDeleteAll, _("Empty wastbasket")),
             "blue": (self.restoreAll, _("Restore all movies")),
         })
     self["key_red"] = Button(_("Delete movie"))
     self["key_green"] = Button(_("Restore movie"))
     self["key_yellow"] = Button(_("Empty Trash"))
     self["key_blue"] = Button(_("Restore all movies"))
     self["waitingtext"] = Label(_("Please wait... Loading trash list..."))
     self["freeDiskSpace"] = self.diskinfo = DiskInfo(
         config.movielist.last_videodir.value, DiskInfo.FREE, update=False)
     self["location"] = Label()
     self["warning"] = Label()
     self["wastetxt"] = Label()
     self["MenuIcon"] = Pixmap()
     self["autoemptylast"] = Label()
     self["autoemptynext"] = Label()
     self["list"] = TrashMovieList(None)
     self.list = self["list"]
     self.staticIP = getIpAddress('eth0')
     self["OkCancelActions"] = HelpableActionMap(
         self, "OkCancelActions",
         {"cancel": (self.abort, _("Exit wastebasket"))})
     self["MenuActions"] = HelpableActionMap(
         self, "MenuActions",
         {"menu": (self.clientSetup, _("Clientbox setup"))})
     self.inited = False
     self.onShown.append(self.setWindowTitle)
Exemplo n.º 14
0
 def __init__(self, session):
     Screen.__init__(self, session)
     HelpableScreen.__init__(self)
     self.skinName = SkinTools.appendResolution("AdvancedMovieSelectionTrash")
     self.delayTimer = eTimer()
     self.delayTimer.callback.append(self.updateHDDData)
     self.current_ref = eServiceReferenceTrash(config.movielist.last_videodir.value)
     self["ColorActions"] = HelpableActionMap(
         self,
         "ColorActions",
         {
             "red": (self.canDelete, _("Delete selected movie")),
             "green": (self.restore, _("Restore movie")),
             "yellow": (self.canDeleteAll, _("Empty wastbasket")),
             "blue": (self.restoreAll, _("Restore all movies")),
         },
     )
     self["key_red"] = Button(_("Delete movie"))
     self["key_green"] = Button(_("Restore movie"))
     self["key_yellow"] = Button(_("Empty Trash"))
     self["key_blue"] = Button(_("Restore all movies"))
     self["waitingtext"] = Label(_("Please wait... Loading trash list..."))
     self["freeDiskSpace"] = self.diskinfo = DiskInfo(
         config.movielist.last_videodir.value, DiskInfo.FREE, update=False
     )
     self["location"] = Label()
     self["warning"] = Label()
     self["wastetxt"] = Label()
     self["MenuIcon"] = Pixmap()
     self["autoemptylast"] = Label()
     self["autoemptynext"] = Label()
     self["list"] = TrashMovieList(None)
     self.list = self["list"]
     self.staticIP = getIpAddress("eth0")
     self["OkCancelActions"] = HelpableActionMap(
         self, "OkCancelActions", {"cancel": (self.abort, _("Exit wastebasket"))}
     )
     self["MenuActions"] = HelpableActionMap(self, "MenuActions", {"menu": (self.clientSetup, _("Clientbox setup"))})
     self.inited = False
     self.onShown.append(self.setWindowTitle)
Exemplo n.º 15
0
 def __init__(self, session):
     Screen.__init__(self, session)
     self.skinName = SkinTools.appendResolution("AdvancedMovieSelectionAbout")
     self["aboutActions"] = ActionMap(["ShortcutActions", "WizardActions", "InfobarEPGActions"],
     {
         "red": self.close,
         "green": self.showchanges,
         "back": self.close,
         "ok": self.close,
     }, -1)
     v = _("Version:")
     b = _("Branch:")
     info = "%s %s.r%s, %s\n  %s %s" % (v, Version.__version__, Version.__revision__, Version.__date__, b, Version.__branch__)
     self["version"] = StaticText(info)
     self["author"] = StaticText(_("Developer:\n  JackDaniel, cmikula"))
     self["translation"] = StaticText(_("Thanks for translation to:\n") + '  nl=Bschaar', 'it=mikark')
     self["license"] = StaticText(_("This plugin may only executed on hardware which is licensed by Dream Multimedia GmbH."))
     self["thanks"] = StaticText(_("Thanks to all other for help and so many very good code."))
     self["key_red"] = StaticText(_("Close"))
     self["key_green"] = StaticText(_("Show changes"))
     self["red"] = Pixmap()
     self["green"] = Pixmap()
     self.onLayoutFinish.append(self.setWindowTitle)
Exemplo n.º 16
0
 def __init__(self, session):
     Screen.__init__(self, session)
     self.skinName = SkinTools.appendResolution("AdvancedMovieSelectionAboutDetails_")
     self["aboutActions"] = ActionMap(["ShortcutActions", "WizardActions", "InfobarEPGActions", "EPGSelectActions"],
     {
         "red": self.close,
         "back": self.close,
         "nextBouquet": self.pageUp,
         "nextBouquet": self.pageUp,
         "prevBouquet": self.pageDown,
         "prevBouquet": self.pageDown,
     }, -1)
     self["key_red"] = StaticText()
     self["red"] = Pixmap()
     self["red"].hide()
     self["bouquet+"] = Pixmap()
     self["bouquet+"].hide()
     self["bouquet-"] = Pixmap()
     self["bouquet-"].hide()
     self["version_list"] = VersionList()
     self["version_list"].hide()
     self["details"] = ScrollLabel()
     self["details"].hide()
     self.onShown.append(self.setWindowTitle)
Exemplo n.º 17
0
    def __init__(self, session, searchTitle, service=None):
        Screen.__init__(self, session)
        HelpableScreen.__init__(self)
        InfoLoadChoice.__init__(self, self.callback_green_pressed)
        self.skinName = ["TMDbMain"]
        if config.AdvancedMovieSelection.show_backdrop.value:
            SkinTools.insertBackdrop(self.skinName)

        self.service = service
        self.movies = []
        if not os_path.exists(IMAGE_TEMPFILE):
            os_mkdir(IMAGE_TEMPFILE)
        self["ColorActions"] = HelpableActionMap(
            self, "ColorActions", {
                "red": (self.red_pressed, _("Toggle detail and list view")),
                "green": (self.green_pressed, _("Save info/cover")),
                "yellow": (self.yellow_pressed, _("Manual search")),
                "blue": (self.blue_pressed, _("Trailer search")),
            }, -1)
        self["WizardActions"] = HelpableActionMap(
            self, "WizardActions", {
                "ok": (self.ok_pressed, _("Toggle detail and list view")),
                "back": (self.cancel, _("Close")),
                "left": (self.left, _("Show previous cover")),
                "right": (self.right, _("Show next cover")),
                "up": (self.moveUp, _("Move up")),
                "down": (self.moveDown, _("Move down")),
            }, -1)
        self["EPGSelectActions"] = HelpableActionMap(
            self, "EPGSelectActions", {
                "nextBouquet": (self.nextBackdrop, _("Show next backdrop")),
                "prevBouquet":
                (self.prevBackdrop, _("Show previous backdrop")),
            })
        self["ChannelSelectBaseActions"] = HelpableActionMap(
            self, "ChannelSelectBaseActions", {
                "nextMarker": (self.right, _("Show next cover")),
                "prevMarker": (self.left, _("Show previous cover")),
            }, -1)
        self["list"] = TMDbList()
        self["tmdblogo"] = Pixmap()
        self["cover"] = Pixmap()
        self["backdrop"] = Pixmap()
        self.picload = PicLoader()
        self.picload.addCallback(self.paintCoverPixmapCB)
        self.backdrop_picload = PicLoader()
        self.backdrop_picload.addCallback(self.paintBackdropPixmapCB)
        self["description"] = ScrollLabel()
        self["extended"] = Label()
        self["status"] = Label()
        self["stars"] = ProgressBar()
        self["no_stars"] = Pixmap()
        self["vote"] = Label()
        self["result_txt"] = Label()
        self["seperator"] = Pixmap()
        self["button_red"] = Pixmap()
        self["button_green"] = Pixmap()
        self["button_yellow"] = Pixmap()
        self["button_blue"] = Pixmap()
        self["key_red"] = StaticText("")
        self["key_green"] = StaticText("")
        self["key_yellow"] = StaticText("")
        self["key_blue"] = StaticText("")
        self.ratingstars = -1
        self.searchTitle = searchTitle
        self.downloadItems = {}
        self.useTMDbInfoAsEventInfo = True
        self.timer = xTimer()
        self.timer.addCallback(self.searchForMovies)
        self.blue_button_timer = xTimer()
        self.blue_button_timer.addCallback(self.callback_blue_pressed)
        self.onClose.append(self.deleteTempDir)
        self.onLayoutFinish.append(self.layoutFinished)
        self.view_mode = self.SHOW_SEARCH
        self.automatic_show_detail = True
Exemplo n.º 18
0
 def __init__(self, session, searchTitle, service=None):
     Screen.__init__(self, session)
     HelpableScreen.__init__(self)
     InfoLoadChoice.__init__(self, self.callback_green_pressed)
     self.skinName = SkinTools.appendResolution('TMDbMain')
     self.service = service
     self.movies = []
     if not os_path.exists(IMAGE_TEMPFILE):
         os_mkdir(IMAGE_TEMPFILE)
     self['ColorActions'] = HelpableActionMap(
         self, 'ColorActions', {
             'red': (self.ok_pressed, _('Toggle detail and list view')),
             'green': (self.green_pressed, _('Save info/cover')),
             'yellow': (self.yellow_pressed, _('Manual search')),
             'blue': (self.blue_pressed, _('Trailer search'))
         }, -1)
     self['WizardActions'] = HelpableActionMap(
         self, 'WizardActions', {
             'ok': (self.ok_pressed, _('Toggle detail and list view')),
             'back': (self.cancel, _('Close')),
             'up': (self.moveUp, _('Move up')),
             'down': (self.moveDown, _('Move down'))
         }, -1)
     self['WizardActions2'] = HelpableActionMap(
         self, 'WizardActions', {
             'left': (self.left, _('Show previous cover')),
             'right': (self.right, _('Show next cover'))
         }, -1)
     self['ChannelSelectBaseActions'] = HelpableActionMap(
         self, 'ChannelSelectBaseActions', {
             'nextMarker': (self.right, _('Show next cover')),
             'prevMarker': (self.left, _('Show previous cover'))
         }, -1)
     self['list'] = TMDbList()
     self['tmdblogo'] = Pixmap()
     self['cover'] = Pixmap()
     self.picload = ePicLoad()
     self.picload.PictureData.get().append(self.paintCoverPixmapCB)
     self['description'] = ScrollLabel()
     self['extended'] = Label()
     self['status'] = Label()
     self['stars'] = ProgressBar()
     self['no_stars'] = Pixmap()
     self['vote'] = Label()
     self['result_txt'] = Label()
     self['seperator'] = Pixmap()
     self['button_red'] = Pixmap()
     self['button_green'] = Pixmap()
     self['button_yellow'] = Pixmap()
     self['button_blue'] = Pixmap()
     self['key_red'] = StaticText('')
     self['key_green'] = StaticText('')
     self['key_yellow'] = StaticText('')
     self['key_blue'] = StaticText('')
     self.ratingstars = -1
     self.searchTitle = searchTitle
     self.downloadItems = {}
     self.useTMDbInfoAsEventInfo = True
     self.timer = eTimer()
     self.timer.callback.append(self.searchForMovies)
     self.blue_button_timer = eTimer()
     self.blue_button_timer.callback.append(self.callback_blue_pressed)
     self.onClose.append(self.deleteTempDir)
     self.onLayoutFinish.append(self.layoutFinished)
     self.view_mode = self.SHOW_SEARCH
     self.tmdb3 = tmdb.init_tmdb3()
     self.updateView()
     self.startSearch()
 def __init__(self, session, event, ref, callback=None, similarEPGCB=None):
     Screen.__init__(self, session)
     self.skinName = SkinTools.appendResolution(
         "AdvancedMovieSelectionEventView")
     EventViewBase.__init__(self, event, ref, callback, similarEPGCB)
     MoviePreview.__init__(self, session)
Exemplo n.º 20
0
 def __init__(self, session, service, eventName=None, shortDescription=None):
     Screen.__init__(self, session)
     InfoLoadChoice.__init__(self, self.callback_green_pressed)
     self.skinName = SkinTools.appendResolution('TheTVDBMain')
     if not pathExists(temp_dir):
         os.mkdir(temp_dir, 511)
     self['setupActions'] = ActionMap(['ColorActions', 'DirectionActions', 'SetupActions', 'OkCancelActions'], {'exit': self.cancel, 
        'ok': self.ok_pressed, 
        'red': self.red_pressed, 
        'green': self.green_pressed, 
        'blue': self.blue_pressed, 
        'yellow': self.yellow_pressed, 
        'cancel': self.cancel, 
        'upUp': self.pageUp, 
        'leftUp': self.pageUp, 
        'downUp': self.pageDown, 
        'rightUp': self.pageDown})
     self.service = service
     self.ratingstars = -1
     self.searchTitle = eventName
     self.description = shortDescription
     if service is not None:
         info = ServiceCenter.getInstance().info(service)
         self.searchTitle = info.getName(service)
         self.description = info.getInfoString(service, iServiceInformation.sDescription)
     print('[tvdb]', str(self.searchTitle), '-', str(self.description))
     if self.description == self.searchTitle:
         self.description = ''
     self.picload = ePicLoad()
     self.picload.PictureData.get().append(self.paintPosterPixmapCB)
     self.picload2 = ePicLoad()
     self.picload2.PictureData.get().append(self.paintBannerPixmapCB)
     self['cover'] = Pixmap()
     self['banner'] = Pixmap()
     self['stars'] = ProgressBar()
     self['no_stars'] = Pixmap()
     self['description'] = ScrollLabel('')
     self['description_episode'] = ScrollLabel('')
     self['extended'] = Label('')
     self['extended_episode'] = Label('')
     self['status'] = Label('')
     self['result_txt'] = Label('')
     self['voted'] = Label('')
     self['list'] = SeriesList()
     self['episodes_list'] = EpisodesList()
     self['seperator'] = Pixmap()
     self['thetvdb_logo'] = Pixmap()
     self['button_red'] = Pixmap()
     self['button_green'] = Pixmap()
     self['button_yellow'] = Pixmap()
     self['button_blue'] = Pixmap()
     self['key_red'] = StaticText('')
     self['key_green'] = StaticText('')
     self['key_yellow'] = StaticText('')
     self['key_blue'] = StaticText('')
     self.timer = eTimer()
     self.timer.callback.append(self.getSeriesList)
     self.red_button_timer = eTimer()
     self.red_button_timer.callback.append(self.callback_red_pressed)
     self.blue_button_timer = eTimer()
     self.blue_button_timer.callback.append(self.callback_blue_pressed)
     self.onLayoutFinish.append(self.layoutFinished)
     self.onClose.append(self.deleteTempDir)
     self.view_mode = self.SHOW_SEARCH
     self.updateView()
     self.startSearch()
     return