|
@@ -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()
|