[gnome-music/wip/mschraal/core-gapless: 1/2] remove stuff
- From: Marinus Schraal <mschraal src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-music/wip/mschraal/core-gapless: 1/2] remove stuff
- Date: Thu, 8 Aug 2019 15:24:13 +0000 (UTC)
commit d971316e8c6d785d26388aabe59674a8fe52d614
Author: Marinus Schraal <mschraal gnome org>
Date: Thu Aug 8 12:53:47 2019 +0200
remove stuff
gnomemusic/player.py | 69 ++--------------------------------------------------
1 file changed, 2 insertions(+), 67 deletions(-)
---
diff --git a/gnomemusic/player.py b/gnomemusic/player.py
index febc1d95..2dc2e127 100644
--- a/gnomemusic/player.py
+++ b/gnomemusic/player.py
@@ -97,34 +97,6 @@ class PlayerPlaylist(GObject.GObject):
self.connect("notify::repeat-mode", self._on_repeat_mode_changed)
- @log
- def change_position(self, prev_pos, new_pos):
- """Change order of a song in the playlist
-
- :param int prev_pos: previous position
- :param int new_pos: new position
- :return: new index of the song being played. -1 if unchanged
- :rtype: int
- """
- pass
-
- @log
- def add_song(self, song, song_index):
- """Add a song to the playlist.
-
- :param Grl.Media song: new song
- :param int song_index: song position
- """
- pass
-
- @log
- def remove_song(self, song_index):
- """Remove a song from the playlist.
-
- :param int song_index: index of the song to remove
- """
- pass
-
@log
def has_next(self):
"""Test if there is a song after the current one.
@@ -378,6 +350,8 @@ class Player(GObject.GObject):
"""
__gsignals__ = {
+ # FIXME: This signal is no longer used, but is connected to
+ # by MPRIS.
'playlist-changed': (GObject.SignalFlags.RUN_FIRST, None, ()),
'seek-finished': (GObject.SignalFlags.RUN_FIRST, None, ()),
'song-changed': (GObject.SignalFlags.RUN_FIRST, None, ())
@@ -569,45 +543,6 @@ class Player(GObject.GObject):
else:
self.play()
- @log
- def playlist_change_position(self, prev_pos, new_pos):
- """Change order of a song in the playlist.
-
- :param int prev_pos: previous position
- :param int new_pos: new position
- :return: new index of the song being played. -1 if unchanged
- :rtype: int
- """
- current_index = self._playlist.change_position(prev_pos, new_pos)
- if current_index >= 0:
- self.emit('playlist-changed')
- return current_index
-
- @log
- def remove_song(self, song_index):
- """Remove a song from the current playlist.
-
- :param int song_index: position of the song to remove
- """
- if self.props.position == song_index:
- if self.props.has_next:
- self.next()
- elif self.props.has_previous:
- self.previous()
- else:
- self.stop()
- self._playlist.remove_song(song_index)
- self.emit('playlist-changed')
-
- @log
- def add_song(self, song, song_index):
- """Add a song to the current playlist.
-
- :param int song_index: position of the song to add
- """
- self._playlist.add_song(song, song_index)
- self.emit('playlist-changed')
-
@log
def playing_playlist(self, playlist_type, playlist_id):
"""Test if the current playlist matches type and id.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]