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