Exemplo n.º 1
0
 def deleteEntry(self):
     if self.menu_level == 1 and self.ltype == "sl_glob_playlist":
         if not self.filelist:
             self.session.open(MessageBoxExt, _("No playlist found"), MessageBoxExt.TYPE_INFO, timeout=2)
             return
         idx = self["liste"].getSelectedIndex()
         SimplePlaylistIO.delEntry("mp_global_pl_%02d" % self.playlist_num, self.filelist, idx)
         self.ml.setList(map(self._defaultlistleft, self.filelist))
     else:
         sel = self["liste"].getCurrent()[0][0]
         if sel in ("2", "3"):
             self.deletePL()
Exemplo n.º 2
0
 def deleteEntry(self):
     if self.menu_level == 1 and self.ltype == 'sl_glob_playlist':
         if not self.filelist:
             self.session.open(MessageBoxExt,
                               _("No playlist found"),
                               MessageBoxExt.TYPE_INFO,
                               timeout=2)
             return
         idx = self['liste'].getSelectedIndex()
         SimplePlaylistIO.delEntry('mp_global_pl_%02d' % self.playlist_num,
                                   self.filelist, idx)
         self.ml.setList(map(self._defaultlistleft, self.filelist))
     else:
         sel = self['liste'].getCurrent()[0][0]
         if sel in ('2', '3'):
             self.deletePL()
Exemplo n.º 3
0
 def globalList(self):
     self._stopUpdateLoop()
     self.ltype = "sl_glob_playlist"
     self["ContentTitle"].setText("Global Playlist-%02d" % self.playlist_num)
     self.filelist = SimplePlaylistIO.getPL("mp_global_pl_%02d" % self.playlist_num)
     if self.filelist == []:
         self.keyLocked = True
         self.filelist.append((_("No entrys found!"), "", "dump", None))
     else:
         self.keyLocked = False
     self.ml.setList(map(self._defaultlistleft, self.filelist))
     self["liste"].moveToIndex(0)
Exemplo n.º 4
0
 def globalList(self):
     self._stopUpdateLoop()
     self.ltype = 'sl_glob_playlist'
     self['ContentTitle'].setText("Global Playlist-%02d" %
                                  self.playlist_num)
     self.filelist = SimplePlaylistIO.getPL('mp_global_pl_%02d' %
                                            self.playlist_num)
     if self.filelist == []:
         self.keyLocked = True
         self.filelist.append((_("No entries found!"), "", "dump", None))
     else:
         self.keyLocked = False
     self.ml.setList(map(self._defaultlistleft, self.filelist))
     self['liste'].moveToIndex(0)
Exemplo n.º 5
0
	def globalList(self):
		self.ltype = 'sl_glob_playlist'
		self['ContentTitle'].setText("Global Playlist-%02d" % self.playlist_num)
		self['F4'].show()
		self.filelist = SimplePlaylistIO.getPL('mp_global_pl_%02d' % self.playlist_num)
		if self.filelist == []:
			self.keyLocked = True
			self['F4'].hide()
			self.filelist.append((_("No entrys found!"), "", "dump"))
		else:
			self['F4'].show()
			self.keyLocked = False
		self.ml.setList(map(self._defaultlistleft, self.filelist))
Exemplo n.º 6
0
	def deleteEntry(self):
		if self.ltype != 'sl_glob_playlist' or not len(self.filelist):
			return
		idx = self['liste'].getSelectedIndex()
		SimplePlaylistIO.delEntry('mp_global_pl_%02d' % self.playlist_num, self.filelist, idx)