[gnome-music/wip/jfelder/playlists-core-rewrite-prep-work: 2/23] playlists: Remove unecessary method clear_playlist
- From: Jean Felder <jfelder src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-music/wip/jfelder/playlists-core-rewrite-prep-work: 2/23] playlists: Remove unecessary method clear_playlist
- Date: Tue, 2 Jul 2019 13:04:32 +0000 (UTC)
commit 2156c08ba56ea0192e119b078aab9f3cd47fa2a1
Author: Jean Felder <jfelder src gnome org>
Date: Tue Jul 2 14:20:36 2019 +0200
playlists: Remove unecessary method clear_playlist
The clear_playlist method is only used to clear a smart playlist
before repopulating it. It does not need to be exposed:
update_smart_playlist method can directly make the appropriate call.
gnomemusic/playlists.py | 11 ++++-------
1 file changed, 4 insertions(+), 7 deletions(-)
---
diff --git a/gnomemusic/playlists.py b/gnomemusic/playlists.py
index 2599d940..8c67eee5 100644
--- a/gnomemusic/playlists.py
+++ b/gnomemusic/playlists.py
@@ -252,14 +252,11 @@ class Playlists(GObject.GObject):
@log
def update_smart_playlist(self, playlist):
- """Given a smart playlist (subclass of SmartPlaylists),
- updates according to its query."""
- # Clear the playlist
- self.clear_playlist(playlist)
+ """Updates a smart playlists.
- @log
- def clear_playlist(self, playlist):
- """Starts cleaning the playlist"""
+ :param SmartPlaylist playlist: playlist to update
+ """
+ # Clear the smart playlist and then repopulate it
query = Query.clear_playlist_with_id(playlist.ID)
self._tracker.update_async(
query, GLib.PRIORITY_LOW, None, self._smart_playlist_cleared_cb,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]