1
0
mirror of https://github.com/spl0k/supysonic.git synced 2024-11-09 19:52:16 +00:00

Make MySQL happy with binary data

Closes #137
This commit is contained in:
spl0k 2019-03-10 11:38:55 +01:00
parent 5367f068e1
commit a73d42b9d8

View File

@ -536,6 +536,7 @@ def parse_uri(database_uri):
return dict(provider = 'postgres', user = uri.username, password = uri.password, host = uri.hostname, dbname = uri.path[1:], **args)
elif uri.scheme == 'mysql':
args.setdefault('charset', 'utf8mb4')
args.setdefault('binary_prefix', True)
return dict(provider = 'mysql', user = uri.username, passwd = uri.password, host = uri.hostname, db = uri.path[1:], **args)
return dict()