From 2d74797e863a57a2e204a6ab9f849d676ee8416d Mon Sep 17 00:00:00 2001 From: Robert Burden Date: Sun, 18 Jan 2015 01:19:22 -0500 Subject: [PATCH] Added API call getSnatched Added API call so you can get a list of what is currently being downloaded. --- headphones/api.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/headphones/api.py b/headphones/api.py index 7273c2ad..df9aa11a 100644 --- a/headphones/api.py +++ b/headphones/api.py @@ -18,7 +18,7 @@ from headphones import db, mb, updater, importer, searcher, cache, postprocessor import headphones import json -cmd_list = ['getIndex', 'getArtist', 'getAlbum', 'getUpcoming', 'getWanted', 'getSimilar', 'getHistory', 'getLogs', +cmd_list = ['getIndex', 'getArtist', 'getAlbum', 'getUpcoming', 'getWanted', 'getSnatched', 'getSimilar', 'getHistory', 'getLogs', 'findArtist', 'findAlbum', 'addArtist', 'delArtist', 'pauseArtist', 'resumeArtist', 'refreshArtist', 'addAlbum', 'queueAlbum', 'unqueueAlbum', 'forceSearch', 'forceProcess', 'forceActiveArtistsUpdate', 'getVersion', 'checkGithub','shutdown', 'restart', 'update', 'getArtistArt', 'getAlbumArt', @@ -166,6 +166,11 @@ class Api(object): "SELECT * from albums WHERE Status='Wanted'") return + def _getSnatched(self, **kwargs): + self.data = self._dic_from_query( + "SELECT * from albums WHERE Status='Snatched'") + return + def _getSimilar(self, **kwargs): self.data = self._dic_from_query('SELECT * from lastfmcloud') return