importsongs: decode hash,old_id to ascii

This commit is contained in:
Daan Sprenkels
2018-02-05 20:04:35 +01:00
parent a7fe50b61d
commit 255cf33d85

View File

@ -42,9 +42,9 @@ class Command(BaseCommand):
artist=import_song[1].decode('utf-8', errors='ignore').strip(),
title=import_song[2].decode('utf-8', errors='ignore').strip(),
duration=float(import_song[4]),
hash=import_song[5].strip(),
hash=import_song[5].decode('ascii').strip(),
deleted=bool(int(import_song[10])),
old_id=import_song[0])
old_id=import_song[0].descode('ascii'))
try:
song.save()
except OperationalError as e: