Ejemplo n.º 1
0
 def __init__(self, session):
     Screen.__init__(self, session)
     HelpableScreen.__init__(self)
     self.skinName = "AdvancedMovieSelectionTrash"
     self.delayTimer = xTimer()
     self.delayTimer.addCallback(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["OkCancelActions"] = HelpableActionMap(self, "OkCancelActions",
         {
             "cancel": (self.abort, _("Exit wastebasket"))
         })
     self.inited = False
     self.onShown.append(self.setWindowTitle)
Ejemplo n.º 2
0
	def __init__(self, session, selectedmovie=None):
#		print "[SF-Plugin] SF:MovieSelection.init, PWD=%s; selmv=%s" % (config.movielist.last_videodir.value, str(selectedmovie))
		Screen.__init__(self, session)
		HelpableScreen.__init__(self)

		self.tags = []
		if selectedmovie:
			self.selected_tags = config.movielist.last_selected_tags.value
		else:
			self.selected_tags = None
		self.selected_tags_ele = None
		self.toggletype = 0

		self.movemode = False
		self.bouquet_mark_edit = False

		self.delayTimer = eTimer()
		self.delayTimer.callback.append(self.updateHDDData)

		self["waitingtext"] = Label(_("Please wait... Loading list..."))

		# create optional description border and hide immediately
		self["DescriptionBorder"] = Pixmap()
		self["DescriptionBorder"].hide()

		if not fileExists(config.movielist.last_videodir.value):
			config.movielist.last_videodir.value = defaultMoviePath()
			config.movielist.last_videodir.save()
#			print "[SF-Plugin] MovieSelection.MovieSelection: save" + config.movielist.last_videodir.value
		self.current_ref = eServiceReference("2:0:1:0:0:0:0:0:0:0:" + config.movielist.last_videodir.value)

		self["list"] = MovieList(None,
			config.movielist.sflisttype.value,
			config.movielist.sfmoviesort.value,
			config.movielist.sftimes.value,
			config.movielist.sftitle_episode_separator.value,
			self)

		self.list = self["list"]
		self.selectedmovie = selectedmovie

		# Need list for init
		SelectionEventInfo.__init__(self)

		self["key_red"] = Button(_("All"))
		self["key_green"] = Button("")
		self["key_yellow"] = Button("")
		self["key_blue"] = Button("")

		self["freeDiskSpace"] = self.diskinfo = DiskInfo(config.movielist.last_videodir.value, DiskInfo.FREE, update=False)

		if config.usage.setup_level.index >= 2: # expert+
			self["InfobarActions"] = HelpableActionMap(self, "InfobarActions",
				{
					"showMovies": (self.doPathSelect, _("select the movie path")),
				})

		self["MovieSelectionActions"] = HelpableActionMap(self, "MovieSelectionActions",
			{
				"contextMenu": (self.doContext, _("menu")),
				"showEventInfo": (self.showEventInformation, _("show event details")),
			})

		self["ColorActions"] = HelpableActionMap(self, "ColorActions",
			{
				"red": (self.showAll, _("show all")),
				"green": (self.showTagsFirst, _("show first selected tag")),
				"yellow": (self.showTagsSecond, _("show second selected tag")),
				"blue": (self.showTagsSelect, _("show tag menu")),
			})

		self["OkCancelActions"] = HelpableActionMap(self, "OkCancelActions",
			{
				"cancel": (self.abort, _("exit movielist")),
				"ok": (self.movieSelected, _("select movie")),
			})

		self["NumberActions"] = HelpableActionMap(self, "SetupActions",
			{
				"0": (self.toggleSort, _x("Toggle date / alphabetic sort mode")),
				"deleteBackward": (self.moveToIndexStrt, _x("Jump to listbegin")),
				"deleteForward": (self.moveToIndexEnd, _x("Jump to listend")),
				"5": (self.toggleMinimal, _x("Toggle style minimal / compact")),
				"8": (self.toggleTags, _x("Toggle description / tags display")),
			})

		self.onShown.append(self.go)
		self.onLayoutFinish.append(self.saveListsize)
		self.inited = False
Ejemplo n.º 3
0
    def __init__(self, session, selectedmovie=None):
        Screen.__init__(self, session)
        HelpableScreen.__init__(self)
        InfoBarBase.__init__(self)  # For ServiceEventTracker

        self.tags = {}
        if selectedmovie:
            self.selected_tags = config.movielist.last_selected_tags.value
        else:
            self.selected_tags = None
        self.selected_tags_ele = None

        self.movemode = False
        self.bouquet_mark_edit = False

        self.delayTimer = eTimer()
        self.delayTimer.callback.append(self.updateHDDData)

        self["waitingtext"] = Label(_("Please wait... Loading list..."))

        # create optional description border and hide immediately
        self["DescriptionBorder"] = Pixmap()
        self["DescriptionBorder"].hide()

        if not os.path.isdir(config.movielist.last_videodir.value):
            config.movielist.last_videodir.value = defaultMoviePath()
            config.movielist.last_videodir.save()
        self.current_ref = eServiceReference(
            "2:0:1:0:0:0:0:0:0:0:" + config.movielist.last_videodir.value)

        self.settings = {\
         "listtype": config.movielist.listtype.value,
         "moviesort": config.movielist.moviesort.value,
         "description": config.movielist.description.value
        }
        self["list"] = MovieList(None,
                                 list_type=self.settings["listtype"],
                                 sort_type=self.settings["moviesort"],
                                 descr_state=self.settings["description"])

        self.list = self["list"]
        self.selectedmovie = selectedmovie

        # Need list for init
        SelectionEventInfo.__init__(self)

        self["key_red"] = Button(_("Delete"))
        self["key_green"] = Button(_("Move"))
        self["key_yellow"] = Button(_("Location"))
        self["key_blue"] = Button(_("Tags"))

        self["freeDiskSpace"] = self.diskinfo = DiskInfo(
            config.movielist.last_videodir.value, DiskInfo.FREE, update=False)

        self["InfobarActions"] = HelpableActionMap(self, "InfobarActions", {
            "showMovies": (self.doPathSelect, _("select the movie path")),
        })

        self["NumberActions"] = HelpableActionMap(
            self, "NumberActions", {
                "1": (self.preview, _("Preview")),
                "2": (self.list.moveToFirst, _("Go to top of list")),
                "5": (self.list.moveToFirstMovie, _("Go to first movie")),
                "8": (self.list.moveToLast, _("Go to last item")),
            })

        self["MovieSelectionActions"] = HelpableActionMap(
            self, "MovieSelectionActions", {
                "contextMenu": (self.doContext, _("menu")),
                "showEventInfo":
                (self.showEventInformation, _("show event details")),
            })

        self["ColorActions"] = HelpableActionMap(
            self, "ColorActions", {
                "red": (self.delete, _("delete...")),
                "green": (self.moveMovie, _("Move to other directory")),
                "yellow": (self.showBookmarks, _("select the movie path")),
                "blue": (self.showTagsSelect, _("show tag menu")),
            })

        self["OkCancelActions"] = HelpableActionMap(
            self, "OkCancelActions", {
                "cancel": (self.abort, _("exit movielist")),
                "ok": (self.itemSelected, _("select movie")),
            })

        self.onShown.append(self.go)
        self.onLayoutFinish.append(self.saveListsize)
        self.list.connectSelChanged(self.updateButtons)
        self.inited = False
        self.onClose.append(self.__onClose)
        NavigationInstance.instance.RecordTimer.on_state_change.append(
            self.list.updateRecordings)
        self.playInBackground = None
        self.__event_tracker = ServiceEventTracker(
            screen=self,
            eventmap={
                #iPlayableService.evSeekableStatusChanged: self.__seekableStatusChanged,
                iPlayableService.evStart:
                self.__serviceStarted,
                iPlayableService.evEOF:
                self.__evEOF,
                #iPlayableService.evSOF: self.__evSOF,
            })
Ejemplo n.º 4
0
    def __init__(self, session, selectedmovie=None):
        Screen.__init__(self, session)
        HelpableScreen.__init__(self)

        self.tags = []
        if selectedmovie:
            self.selected_tags = config.movielist.last_selected_tags.value
        else:
            self.selected_tags = None
        self.selected_tags_ele = None

        self.movemode = False
        self.bouquet_mark_edit = False

        self.delayTimer = eTimer()
        self.delayTimer.callback.append(self.updateHDDData)

        self["waitingtext"] = Label(_("Please wait... Loading list..."))

        # create optional description border and hide immediately
        self["DescriptionBorder"] = Pixmap()
        self["DescriptionBorder"].hide()

        if not fileExists(config.movielist.last_videodir.value):
            config.movielist.last_videodir.value = defaultMoviePath()
            config.movielist.last_videodir.save()
        self.current_ref = eServiceReference(
            "2:0:1:0:0:0:0:0:0:0:" + config.movielist.last_videodir.value)

        self["list"] = MovieList(None, config.movielist.listtype.value,
                                 config.movielist.moviesort.value,
                                 config.movielist.description.value)

        self.list = self["list"]
        self.selectedmovie = selectedmovie

        # Need list for init
        SelectionEventInfo.__init__(self)

        self["key_red"] = Button(_("All"))
        self["key_green"] = Button("")
        self["key_yellow"] = Button("")
        self["key_blue"] = Button("")

        self["freeDiskSpace"] = self.diskinfo = DiskInfo(
            config.movielist.last_videodir.value, DiskInfo.FREE, update=False)

        if config.usage.setup_level.index >= 2:  # expert+
            self["InfobarActions"] = HelpableActionMap(
                self, "InfobarActions", {
                    "showMovies":
                    (self.doPathSelect, _("select the movie path")),
                })

        self["MovieSelectionActions"] = HelpableActionMap(
            self, "MovieSelectionActions", {
                "contextMenu": (self.doContext, _("menu")),
                "showEventInfo":
                (self.showEventInformation, _("show event details")),
            })

        self["ColorActions"] = HelpableActionMap(
            self, "ColorActions", {
                "red": (self.showAll, _("show all")),
                "green": (self.showTagsFirst, _("show first selected tag")),
                "yellow": (self.showTagsSecond, _("show second selected tag")),
                "blue": (self.showTagsSelect, _("show tag menu")),
            })

        self["OkCancelActions"] = HelpableActionMap(
            self, "OkCancelActions", {
                "cancel": (self.abort, _("exit movielist")),
                "ok": (self.movieSelected, _("select movie")),
            })

        self.onShown.append(self.go)
        self.onLayoutFinish.append(self.saveListsize)
        self.inited = False