Compare commits
2 Commits
71c05404af
...
a8e5b976fe
Author | SHA1 | Date | |
---|---|---|---|
|
a8e5b976fe | ||
|
5f0deef482 |
@ -87,7 +87,7 @@ def new_blank_movie():
|
||||
db = get_db()
|
||||
id = db.execute("INSERT INTO movies DEFAULT VALUES RETURNING id").fetchone()["id"]
|
||||
nb = new_nb()
|
||||
db.execute("UPDATE movies SET number = ? WHERE id = ?", (nb, id))
|
||||
db.execute("UPDATE movies SET number = ?, watched = 0 WHERE id = ?", (nb, id))
|
||||
db.commit()
|
||||
return {"id": id, "nb": nb}
|
||||
|
||||
|
@ -41,6 +41,10 @@ def imdbid(imdbid):
|
||||
img = get(poster)
|
||||
if img.status_code == 200:
|
||||
movie["poster"] = posters.save(poster, img.content)
|
||||
else:
|
||||
movie["poster"] = None
|
||||
else:
|
||||
movie["poster"] = None
|
||||
return movie
|
||||
else:
|
||||
return None
|
||||
|
Loading…
Reference in New Issue
Block a user