PornHub-downloader-python
PornHub-downloader-python copied to clipboard
Deduplication of URLs does not work when adding same URL.
Adding URL calls add_item function, which checks new URL vs item_name, but not vs url in the database.
Don't know how to make pull requests. But here is the fix:
--- a/functions.py
+++ b/functions.py
@@ -274,7 +274,7 @@ def add_item(name_check):
conn = create_connection(database)
c = conn.cursor()
try:
- c.execute("SELECT count(*) FROM ph_items WHERE url_name = ?", (item_name,))
+ c.execute("SELECT count(*) FROM ph_items WHERE url_name = ? and type = ? ", (item_url_name,item_type))