Closed srozb closed 2 years ago
Fix merged in #24.
There is however remaining issue related to database not being properly initialized which results in torrents pretending to be inserted into the DB while in fact they aren't.
I think here's a line to blame and this applies to other crawlers too.
According to db_sqlite documentation, proc tryInsertID()
will return -1
in case of error and aforementioned line just discarding this fact with no warning/error.
I'd suggest to change application logic (perhaps proc insert_torrent()
?) so user is notified of errors related to db operations.
Thanks for the report @srozb! I changed the code so you aren't told an insert happened when it didn't. Much better!
Hey, I've cloned master branch and built sources with
nimble build
(using nim 1.4.8 on MacOS). After successful build I am unable to initialize sqlite database as below:NUKE_MY_DATABASE=true ./torrentinim
I believe the problem persist because of lack of quotes around
utf-8
here.