Merge branch 'master' into develop
This commit is contained in:
commit
e3ce109ceb
1
create_release.sh
Executable file
1
create_release.sh
Executable file
|
@ -0,0 +1 @@
|
|||
zip -r lomion.tmdb.mbp maubot.yaml tmdb/__init__.py tmdb/tmdb.py tmdb/tmdb_api.py tmdb/database.py
|
|
@ -1,6 +1,6 @@
|
|||
maubot: 0.1.0
|
||||
id: lomion.tmdb
|
||||
version: 1.0.0
|
||||
version: 1.0.1
|
||||
license: AGPL 3.0
|
||||
modules:
|
||||
- tmdb
|
||||
|
|
|
@ -45,7 +45,11 @@ class Database:
|
|||
def get_language(self, user_id):
|
||||
rows = self.db.execute(select([self.language.c.language])
|
||||
.where(self.language.c.user_id == user_id))
|
||||
return rows.fetchone()['language']
|
||||
row = rows.fetchone()
|
||||
if row:
|
||||
return row['language']
|
||||
else:
|
||||
return None
|
||||
|
||||
def set_poster_size(self, user_id, size):
|
||||
with self.db.begin() as tx:
|
||||
|
@ -55,4 +59,8 @@ class Database:
|
|||
def get_poster_size(self, user_id):
|
||||
rows = self.db.execute(select([self.tmdb_poster_size.c.size])
|
||||
.where(self.tmdb_poster_size.c.user_id == user_id))
|
||||
return rows.fetchone()['size']
|
||||
row = rows.fetchone()
|
||||
if row:
|
||||
return row['size']
|
||||
else:
|
||||
return None
|
Loading…
Reference in a new issue