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



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

    player: Remove some unused properties and methods
    
    (cherry picked from commit 523e1ce1b7bbe2c0aaec8c79961f722413c8333b)

 gnomemusic/player.py | 53 ----------------------------------------------------
 1 file changed, 53 deletions(-)
---
diff --git a/gnomemusic/player.py b/gnomemusic/player.py
index e64044dd..51f73d6a 100644
--- a/gnomemusic/player.py
+++ b/gnomemusic/player.py
@@ -85,9 +85,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)
@@ -343,24 +340,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
@@ -566,20 +545,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(
@@ -648,24 +613,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]