Simple fixes

This commit is contained in:
Giulio 2018-08-27 14:53:04 +02:00
parent f470fc5ece
commit 46abefd447
2 changed files with 13 additions and 13 deletions

View File

@ -21,7 +21,7 @@ out.write('''<!DOCTYPE html>
<style type="text/css">body{margin:40px auto;max-width:740px;line-height:1.6;color:#444;padding:0 10px}h1,h2,h3{line-height:1.2;font-size:18px;}li{font-size:12px;}</style>
</head>
<body>
<a href="{}">Source Database</a><br/><br/>'''.format(vvvvidb))
<a href="''' + vvvvidb + '''">Source Database</a><br/><br/>''')
# select all the series
# cur.execute("SELECT * FROM series;")

View File

@ -103,17 +103,17 @@ if not os.path.isfile(vvvvidb):
cur.execute("CREATE TABLE episodes (serie_id INTEGER, season_id INTEGER, cdn_url TEXT NOT NULL, type TEXT NOT NULL);")
con.commit()
con.close()
#else:
# con = sqlite3.connect(vvvvidb)
# cur = con.cursor()
# cur.execute("SELECT id FROM series ORDER BY id DESC LIMIT 1;")
# rows = cur.fetchall()
# if len(rows) > 0:
# last = rows[0][0] + 1
# con.commit()
# con.close()
#
#print("Resuming from...{}".format(last))
else:
con = sqlite3.connect(vvvvidb)
cur = con.cursor()
cur.execute("SELECT id FROM series ORDER BY id DESC LIMIT 1;")
rows = cur.fetchall()
if len(rows) > 0:
last = rows[0][0] + 1
con.commit()
con.close()
print("Resuming from...{}".format(last))
con = sqlite3.connect(vvvvidb)
cur = con.cursor()
@ -164,4 +164,4 @@ for i in range(last, min(last + 500, 1000)):
# episodi gia' presenti
pass
con.close()
con.close()