def set_prev(self): """ Set previous track """ try: # Look at externals self._prev_track = ExternalsPlayer.prev(self) # Look at radio if self._prev_track.id is None: self._prev_track = RadioPlayer.prev(self) # Look at user playlist then if self._prev_track.id is None: self._prev_track = UserPlaylistPlayer.prev(self) # Look at shuffle if self._prev_track.id is None: self._prev_track = ShufflePlayer.prev(self) # Get a linear track then if self._prev_track.id is None: self._prev_track = LinearPlayer.prev(self) self.emit('prev-changed') except Exception as e: print("Player::set_prev", e)
def set_prev(self): """ Set previous track """ try: if Lp().settings.get_enum("playback") == NextContext.REPEAT_TRACK: self._prev_track = self._current_track else: # Look at externals self._prev_track = ExternalsPlayer.prev(self) # Look at radio if self._prev_track.id is None: self._prev_track = RadioPlayer.prev(self) # Look at user playlist then if self._prev_track.id is None: self._prev_track = UserPlaylistPlayer.prev(self) # Look at shuffle if self._prev_track.id is None: self._prev_track = ShufflePlayer.prev(self) # Get a linear track then if self._prev_track.id is None: self._prev_track = LinearPlayer.prev(self) self.emit("prev-changed") except Exception as e: print("Player::set_prev():", e)
def set_prev(self): """ Set previous track """ # Special case to return from queue if self._queue and self.context.prev_track.id is None: self.context.prev_track = self.current_track elif not self._queue and self.context.prev_track.id is not None: self.prev_track = self.context.prev_track self.context.prev_track = Track() self.emit('prev-changed') return # Look at externals self.prev_track = ExternalsPlayer.prev(self) # Look at radio if self.prev_track.id is None: self.prev_track = RadioPlayer.prev(self) # Look at user playlist then if self.prev_track.id is None: self.prev_track = UserPlaylistPlayer.prev(self) # Look at shuffle if self.prev_track.id is None: self.prev_track = ShufflePlayer.prev(self) # Get a linear track then if self.prev_track.id is None: self.prev_track = LinearPlayer.prev(self) self.emit('prev-changed')
def set_prev(self): """ Set previous track """ try: if Lp().settings.get_enum('playback') == NextContext.REPEAT_TRACK: self._prev_track = self.current_track else: # Look at externals self._prev_track = ExternalsPlayer.prev(self) # Look at radio if self._prev_track.id is None: self._prev_track = RadioPlayer.prev(self) # Look at user playlist then if self._prev_track.id is None: self._prev_track = UserPlaylistPlayer.prev(self) # Look at shuffle if self._prev_track.id is None: self._prev_track = ShufflePlayer.prev(self) # Get a linear track then if self._prev_track.id is None: self._prev_track = LinearPlayer.prev(self) self.emit('prev-changed') except Exception as e: print("Player::set_prev", e)
def prev(self): # Look at user playlist then track_id = UserPlaylistPlayer.prev(self) # Look at shuffle if track_id is None: track_id = ShufflePlayer.prev(self) if track_id is None: track_id = LinearPlayer.prev(self) if track_id is not None: self.load(track_id)
def set_prev(self): """ Set previous track """ if self._current_track.id is None: return try: if App().settings.get_value("shuffle") or self.is_party: prev_track = ShufflePlayer.prev(self) else: prev_track = LinearPlayer.prev(self) self._prev_track = prev_track emit_signal(self, "prev-changed") except Exception as e: Logger.error("Player::set_prev(): %s" % e)
def _set_prev(self): # Look at externals self.prev_track = ExternalsPlayer.prev(self) # Look at radio if self.prev_track.id is None: self.prev_track = RadioPlayer.prev(self) # Look at user playlist then if self.prev_track.id is None: self.prev_track = UserPlaylistPlayer.prev(self) # Look at shuffle if self.prev_track.id is None: self.prev_track = ShufflePlayer.prev(self) # Get a linear track then if self.prev_track.id is None: self.prev_track = LinearPlayer.prev(self)
def set_prev(self): """ Set previous track """ if self.current_track.id == Type.RADIOS: return try: prev_track = ShufflePlayer.prev(self) # Look at user playlist then if prev_track.id is None: prev_track = PlaylistPlayer.prev(self) # Get a linear track then if prev_track.id is None: prev_track = LinearPlayer.prev(self) self._prev_track = prev_track self.emit("prev-changed") except Exception as e: Logger.error("Player::set_prev(): %s" % e)
def set_prev(self): """ Set previous track """ # Look at externals self.prev_track = ExternalsPlayer.prev(self) # Look at radio if self.prev_track.id is None: self.prev_track = RadioPlayer.prev(self) # Look at user playlist then if self.prev_track.id is None: self.prev_track = UserPlaylistPlayer.prev(self) # Look at shuffle if self.prev_track.id is None: self.prev_track = ShufflePlayer.prev(self) # Get a linear track then if self.prev_track.id is None: self.prev_track = LinearPlayer.prev(self)
def set_prev(self): """ Set previous track """ try: # Same track if App().settings.get_enum("playback") == NextContext.REPEAT_TRACK: prev_track = self._current_track # Look at shuffle else: prev_track = ShufflePlayer.prev(self) # Look at user playlist then if prev_track.id is None: prev_track = PlaylistPlayer.prev(self) # Get a linear track then if prev_track.id is None: prev_track = LinearPlayer.prev(self) self._prev_track = prev_track self.emit("prev-changed") except Exception as e: Logger.error("Player::set_prev(): %s" % e)
def set_prev(self): """ Set previous track """ # Look at externals self.prev_track = ExternalsPlayer.prev(self) # Look at radio if self.prev_track.id is None: self.prev_track = RadioPlayer.prev(self) # Look at user playlist then if self.prev_track.id is None: self.prev_track = UserPlaylistPlayer.prev(self) # Look at shuffle if self.prev_track.id is None: self.prev_track = ShufflePlayer.prev(self) # Get a linear track then if self.prev_track.id is None: self.prev_track = LinearPlayer.prev(self) self.emit('prev-changed')