[gnome-music] playlist: always create a new smart playlist if it was not found



commit be4761ed367e4c44b008cbc8417f4737238ea414
Author: Vadim Rutkovsky <vrutkovs redhat com>
Date:   Mon Feb 16 21:16:23 2015 +0100

    playlist: always create a new smart playlist
    if it was not found

 gnomemusic/playlists.py |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)
---
diff --git a/gnomemusic/playlists.py b/gnomemusic/playlists.py
index 7b169b3..2b3e030 100644
--- a/gnomemusic/playlists.py
+++ b/gnomemusic/playlists.py
@@ -116,11 +116,11 @@ class Playlists(GObject.GObject):
             while (cursor.next(None)):
                 playlist.ID = cursor.get_integer(1)
 
-                if not playlist.ID:
-                    # create the playlist
-                    playlist.ID = self.create_playlist_and_return_id(playlist.TITLE, playlist.TAG_TEXT)
+            if not playlist.ID:
+                # create the playlist
+                playlist.ID = self.create_playlist_and_return_id(playlist.TITLE, playlist.TAG_TEXT)
 
-                self.update_static_playlist(playlist)
+            self.update_static_playlist(playlist)
 
         for playlist in playlists:
             self.tracker.query_async(


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