mirror of
https://github.com/rembo10/headphones.git
synced 2026-07-22 00:44:00 +01:00
Added ThumbURLs to the artist & album tables in the DB, modfied API_REFERENCE to reflect
This commit is contained in:
@@ -384,6 +384,13 @@ class Cache(object):
|
||||
# Grab the thumbnail as well if we're getting the full artwork (as long as it's missing/outdated
|
||||
if thumb_url and self.query_type in ['thumb','artwork'] and not (self.thumb_files and self._is_current(self.thumb_files[0])):
|
||||
|
||||
myDB = db.DBConnection()
|
||||
|
||||
if self.id_type == 'artist':
|
||||
myDB.action('UPDATE artists SET ThumbURL=? WHERE ArtistID=?', [thumb_url, self.id])
|
||||
else:
|
||||
myDB.action('UPDATE albums SET ThumbURL=? WHERE AlbumID=?', [thumb_url, self.id])
|
||||
|
||||
try:
|
||||
artwork = urllib2.urlopen(thumb_url).read()
|
||||
except Exception, e:
|
||||
|
||||
Reference in New Issue
Block a user