diff --git a/data/interfaces/default/css/style.css b/data/interfaces/default/css/style.css
index 1c77c778..4e7b0739 100644
--- a/data/interfaces/default/css/style.css
+++ b/data/interfaces/default/css/style.css
@@ -1236,6 +1236,7 @@ div#artistheader h2 a {
position: relative;
top: 7px;
}
+#trashcan {margin-top:15px;}
.cloudtag {
font-size: 16px;
}
diff --git a/data/interfaces/default/history.html b/data/interfaces/default/history.html
index baf72b3d..b7cef364 100644
--- a/data/interfaces/default/history.html
+++ b/data/interfaces/default/history.html
@@ -26,6 +26,7 @@
Size |
Status |
|
+ |
@@ -54,6 +55,7 @@
${helpers.bytes_to_mb(item['Size'])} |
${item['Status']} |
[retry][new] |
+
%endfor
|
diff --git a/data/interfaces/default/images/trashcan.png b/data/interfaces/default/images/trashcan.png
new file mode 100644
index 00000000..de10cbda
Binary files /dev/null and b/data/interfaces/default/images/trashcan.png differ
diff --git a/headphones/webserve.py b/headphones/webserve.py
index ab923cd2..497ecd7b 100644
--- a/headphones/webserve.py
+++ b/headphones/webserve.py
@@ -843,14 +843,18 @@ class WebInterface(object):
return json_albums
getAlbumsByArtist_json.exposed=True
- def clearhistory(self, type=None):
+ def clearhistory(self, type=None, date_added=None, title=None):
myDB = db.DBConnection()
- if type == 'all':
- logger.info(u"Clearing all history")
- myDB.action('DELETE from snatched')
+ if type:
+ if type == 'all':
+ logger.info(u"Clearing all history")
+ myDB.action('DELETE from snatched')
+ else:
+ logger.info(u"Clearing history where status is %s" % type)
+ myDB.action('DELETE from snatched WHERE Status=?', [type])
else:
- logger.info(u"Clearing history where status is %s" % type)
- myDB.action('DELETE from snatched WHERE Status=?', [type])
+ logger.info(u"Deleting '%s' from history" % title)
+ myDB.action('DELETE from snatched WHERE Title=? AND DateAdded=?', [title, date_added])
raise cherrypy.HTTPRedirect("history")
clearhistory.exposed = True