[gnome-music/wip/jfelder/restore-mpris-playlists: 8/9] player: Remove some unused properties and methods



commit 55f84cd70f5e696720b28244c7191b1738e467e0
Author: Jean Felder <jfelder src gnome org>
Date:   Sat Sep 21 22:26:35 2019 +0200

    player: Remove some unused properties and methods

 gnomemusic/player.py | 53 ----------------------------------------------------
 1 file changed, 53 deletions(-)
---
diff --git a/gnomemusic/player.py b/gnomemusic/player.py
index ac698d0f..0e23754a 100644
--- a/gnomemusic/player.py
+++ b/gnomemusic/player.py
@@ -79,9 +79,6 @@ class PlayerPlaylist(GObject.GObject):
         self._app = application
         self._position = 0
 
-        self._type = -1
-        self._id = -1
-
         self._validation_songs = {}
         self._discoverer = GstPbutils.Discoverer()
         self._discoverer.connect("discovered", self._on_discovered)
@@ -337,24 +334,6 @@ class PlayerPlaylist(GObject.GObject):
         else:
             coresong.props.validation = CoreSong.Validation.SUCCEEDED
 
-    @GObject.Property(type=int, flags=GObject.ParamFlags.READABLE)
-    def playlist_id(self):
-        """Get playlist unique identifier.
-
-        :returns: playlist id
-        :rtype: int
-        """
-        return self._id
-
-    @GObject.Property(type=int, flags=GObject.ParamFlags.READABLE)
-    def playlist_type(self):
-        """Get playlist type.
-
-        :returns: playlist type
-        :rtype: PlayerPlaylist.Type
-        """
-        return self._type
-
 
 class Player(GObject.GObject):
     """Main Player object
@@ -569,20 +548,6 @@ class Player(GObject.GObject):
         else:
             self.play()
 
-    @log
-    def playing_playlist(self, playlist_type, playlist_id):
-        """Test if the current playlist matches type and id.
-
-        :param PlayerPlaylist.Type playlist_type: playlist type
-        :param string playlist_id: unique identifer to recognize the playlist
-        :returns: True if these are the same playlists. False otherwise.
-        :rtype: bool
-        """
-        if (playlist_type == self._playlist.props.playlist_type
-                and playlist_id == self._playlist.props.playlist_id):
-            return True
-        return False
-
     @log
     def _on_clock_tick(self, klass, tick):
         logger.debug("Clock tick {}, player at {} seconds".format(
@@ -651,24 +616,6 @@ class Player(GObject.GObject):
         """
         return self._playlist.props.current_song
 
-    @log
-    def get_playlist_type(self):
-        """Playlist type getter
-
-        :returns: Current playlist type. None if no playlist.
-        :rtype: PlayerPlaylist.Type
-        """
-        return self._playlist.props.playlist_type
-
-    @log
-    def get_playlist_id(self):
-        """Playlist id getter
-
-        :returns: PlayerPlaylist identifier. None if no playlist.
-        :rtype: int
-        """
-        return self._playlist.props.playlist_id
-
     @log
     def get_position(self):
         """Get player position.


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]