title/collection can be unicode

This commit is contained in:
Jan Gerber 2015-09-22 10:38:05 +01:00
parent a30e8df593
commit 52746ea0ed

View file

@ -37,8 +37,8 @@ def get_frame(id, height, position):
def get_hue(collection, title): def get_hue(collection, title):
return ox.getHSL( return ox.getHSL(
[int(''.join(x), 16) for x in zip( [int(''.join(x), 16) for x in zip(
hashlib.sha1(collection).hexdigest()[:3], hashlib.sha1(collection.encode('utf-8')).hexdigest()[:3],
hashlib.sha1(title).hexdigest()[:3] hashlib.sha1(title.encode('utf-8')).hexdigest()[:3]
)] )]
)[0] )[0]