From c36d1813ee1a4fdb49ea2b97ca8ea2140eac35d7 Mon Sep 17 00:00:00 2001 From: spl0k Date: Tue, 16 Jan 2018 19:45:28 +0100 Subject: [PATCH] Fixed setting client preferences --- supysonic/db.py | 2 +- supysonic/frontend/user.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/supysonic/db.py b/supysonic/db.py index c723ee4..0faac34 100644 --- a/supysonic/db.py +++ b/supysonic/db.py @@ -297,7 +297,7 @@ class ClientPrefs(db.Entity): user = Required(User, column = 'user_id') client_name = Required(str, 32) PrimaryKey(user, client_name) - format = Optional(str, 8) + format = Optional(str, 8, nullable = True) bitrate = Optional(int) class StarredFolder(db.Entity): diff --git a/supysonic/frontend/user.py b/supysonic/frontend/user.py index 9a9a422..20d02fd 100644 --- a/supysonic/frontend/user.py +++ b/supysonic/frontend/user.py @@ -84,7 +84,7 @@ def update_clients(uid, user): continue if client not in clients_opts: - clients_opts[client] = dict(opt = value) + clients_opts[client] = dict([ (opt, value) ]) else: clients_opts[client][opt] = value app.logger.debug(clients_opts)