Show index for new bookmark.

Signed-off-by: Arun Prakash Jana <engineerarun@gmail.com>
This commit is contained in:
Arun Prakash Jana 2015-11-10 11:54:30 +05:30
parent 52d8a6fdc1
commit c853d04ac9

1
markit
View File

@ -216,6 +216,7 @@ def AddUpdateEntry(conn, cur, keywords, entry):
else:
cur.execute('INSERT INTO bookmarks(id, URL, metadata, tags) VALUES (?, ?, ?, ?)', (int(addindex), url, meta, tags,))
conn.commit()
print("Added at index %d" % cur.lastrowid)
except sqlite3.IntegrityError:
for row in cur.execute("SELECT id from bookmarks where URL LIKE ?", (url,)):
print("URL already exists at index %s" % row[0])