From 56e6dab6706ef9fd71bfdc4e554cea97af038dce Mon Sep 17 00:00:00 2001 From: redvers76 Date: Tue, 30 Aug 2011 22:57:02 +0200 Subject: [PATCH 1/3] Added ability to delete an existing album from an artist --- headphones/webserve.py | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/headphones/webserve.py b/headphones/webserve.py index 27de859f..dd5dc497 100644 --- a/headphones/webserve.py +++ b/headphones/webserve.py @@ -177,6 +177,17 @@ class WebInterface(object): raise cherrypy.HTTPRedirect("artistPage?ArtistID=%s" % ArtistID) unqueueAlbum.exposed = True + def deleteAlbum(self, AlbumID, ArtistID=None): + logger.info(u"Deleting all traces of album: " + AlbumID) + myDB = db.DBConnection() + myDB.action('DELETE from albums WHERE AlbumID=?', [AlbumID]) + myDB.action('DELETE from tracks WHERE AlbumID=?', [AlbumID]) + if ArtistID: + raise cherrypy.HTTPRedirect("artistPage?ArtistID=%s" % ArtistID) + else: + raise cherrypy.HTTPRedirect("home") + deleteAlbum.exposed = True + def upcoming(self): myDB = db.DBConnection() upcoming = myDB.select("SELECT * from albums WHERE ReleaseDate > date('now') order by ReleaseDate DESC") From 525b5dca0c856c4285e78da4d4b02b512038a422 Mon Sep 17 00:00:00 2001 From: redvers76 Date: Tue, 30 Aug 2011 23:00:31 +0200 Subject: [PATCH 2/3] Added ability to delete an existing album from an artist --- data/interfaces/default/album.html | 1 + 1 file changed, 1 insertion(+) diff --git a/data/interfaces/default/album.html b/data/interfaces/default/album.html index ca2e9ce3..1e38f419 100644 --- a/data/interfaces/default/album.html +++ b/data/interfaces/default/album.html @@ -7,6 +7,7 @@ <%def name="headerIncludes()">
    +
  • Delete Album
  • %if album['Status'] == 'Skipped':
  • Mark Album as Wanted
  • %elif album['Status'] == 'Wanted': From da1252e88a0c1b839bdc5d65cd8d5f0d4bf07325 Mon Sep 17 00:00:00 2001 From: redvers76 Date: Tue, 30 Aug 2011 23:01:21 +0200 Subject: [PATCH 3/3] Added ability to delete an existing album from an artist --- data/interfaces/remix/album.html | 1 + 1 file changed, 1 insertion(+) diff --git a/data/interfaces/remix/album.html b/data/interfaces/remix/album.html index ca2e9ce3..1e38f419 100644 --- a/data/interfaces/remix/album.html +++ b/data/interfaces/remix/album.html @@ -7,6 +7,7 @@ <%def name="headerIncludes()">