Added info refresh to service

This commit is contained in:
warwickh
2021-09-17 18:09:10 +10:00
parent 9be5f646da
commit 40d4ac737a
8 changed files with 159 additions and 40 deletions

View File

@ -46,7 +46,7 @@ class SQLiteDatabase(object):
return self.conn.cursor()
def run_query(self, query, params=None, cursor=None):
print("Processing query %s params %s"%(str(query),str(params)))
#print("Processing query %s params %s"%(str(query),str(params)))
try:
if cursor is None:
cursor = self.get_cursor()
@ -54,7 +54,7 @@ class SQLiteDatabase(object):
cursor.execute(query, params)
else:
cursor.execute(query)
print("%s rows affected"%cursor.rowcount)
#print("%s rows affected"%cursor.rowcount)
return cursor
except sql.Error as e:
print("SQLite error %s"%e.args[0])
@ -71,7 +71,7 @@ class SQLiteDatabase(object):
return record_age
except Exception as e:
print("get_record_age failed %s" % e)
return
return 0
def get_artist_info(self, artist_id):
query = 'SELECT * FROM artist_info WHERE artist_id = ?'# %str(artist_id)