[gnome-music] Remove obsolete update_last_played



commit 8e300468d0cebd556e38139b2dcd6c680efbb9b5
Author: Marinus Schraal <mschraal src gnome org>
Date:   Mon Dec 5 15:51:15 2016 +0100

    Remove obsolete update_last_played
    
    Unused, part of commit ae1c99eb, but missed with the commit.

 gnomemusic/playlists.py |    6 ------
 gnomemusic/query.py     |   19 -------------------
 2 files changed, 0 insertions(+), 25 deletions(-)
---
diff --git a/gnomemusic/playlists.py b/gnomemusic/playlists.py
index b79d6fb..8bcef50 100644
--- a/gnomemusic/playlists.py
+++ b/gnomemusic/playlists.py
@@ -236,12 +236,6 @@ class Playlists(GObject.GObject):
                                         tag_created_cb, playlist)
 
     @log
-    def update_last_played(self, song_url):
-        cur_time = time.strftime(sparql_dateTime_format, time.gmtime())
-        query = Query.update_last_played(song_url, cur_time)
-        self.tracker.update(query, GLib.PRIORITY_LOW, None)
-
-    @log
     def update_static_playlist(self, playlist):
         """Given a static playlist (subclass of StaticPlaylists), updates according to its query."""
         # Clear the playlist
diff --git a/gnomemusic/query.py b/gnomemusic/query.py
index 1a9513e..2992080 100644
--- a/gnomemusic/query.py
+++ b/gnomemusic/query.py
@@ -408,25 +408,6 @@ class Query():
         return query
 
     @staticmethod
-    def update_last_played(song_url, time):
-        query = """
-    INSERT OR REPLACE { ?song nfo:fileLastAccessed '%(time)s' . }
-    WHERE {
-        SELECT
-            ?song
-            WHERE {
-                ?song a nmm:MusicPiece .
-                FILTER ( nie:url(?song) = "%(song_url)s" )
-            }
-        }
-    """.replace("\n", " ").strip() % {
-            'song_url': song_url,
-            'time': time
-        }
-
-        return query
-
-    @staticmethod
     def create_playlist(title):
         query = """
     INSERT {


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