[gnome-music/wip/jfelder/3-34-smart-playlist-empty-count] grltrackerplaylists: Reset count when all songs are removed
- From: Jean Felder <jfelder src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-music/wip/jfelder/3-34-smart-playlist-empty-count] grltrackerplaylists: Reset count when all songs are removed
- Date: Sat, 28 Mar 2020 20:53:50 +0000 (UTC)
commit a2185c001df433aa0fb39b8d4c0c7887d50f15bc
Author: astanwar99 <as tanwar3198 gmail com>
Date: Sat Mar 28 20:19:24 2020 +0530
grltrackerplaylists: Reset count when all songs are removed
When last media is removed from the smart playlist (new_model_medias
is empty) the count property needs to be reset.
Closes: #376
gnomemusic/grilowrappers/grltrackerplaylists.py | 1 +
1 file changed, 1 insertion(+)
---
diff --git a/gnomemusic/grilowrappers/grltrackerplaylists.py b/gnomemusic/grilowrappers/grltrackerplaylists.py
index 51911acc..02f9e4c0 100644
--- a/gnomemusic/grilowrappers/grltrackerplaylists.py
+++ b/gnomemusic/grilowrappers/grltrackerplaylists.py
@@ -749,6 +749,7 @@ class SmartPlaylist(Playlist):
def _finish_update(self, new_model_medias):
if not new_model_medias:
self._model.remove_all()
+ self.props.count = 0
return
current_models_ids = [coresong.props.media.get_id()
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]