Fix get_artist for artists without description or with few songs (closes #26)

song and view counts are now returned as int
This commit is contained in:
sigma67 2020-05-28 00:40:23 +02:00
commit 5bfa86a4d8
No known key found for this signature in database
GPG key ID: 1545A01D4474BAF0
3 changed files with 26 additions and 18 deletions

View file

@ -46,3 +46,7 @@ def get_authorization(auth):
unix_timestamp = str(int(time.time()))
sha_1.update((unix_timestamp + ' ' + auth).encode('utf-8'))
return "SAPISIDHASH " + unix_timestamp + "_" + sha_1.hexdigest()
def to_int(string):
return int(string.split(' ')[0].replace(',', ''))