06d864d49f
fix error with sqlite ≥ 3.34
...
Since sqlite 3.34[1] deleting a record in a fts5 table that doesn't
exist became an error. The resuls it that adding a torrent "corrupts"
the database and magnetico fails with this error:
Could not add new torrent to the database.
tx.Exec (INSERT OR REPLACE INTO torrents) database disk image is malformed
The problem can be simply avoided by setting modified_on = discovered_on
when inserting the torrent, instead of updating it afterwards with a
trigger.
[1]: 86f477edaa
2024-07-25 13:46:36 +02:00
Michał Gątkowski
828e230d3b
Minor fixes related to searching
2022-08-10 14:06:10 +02:00
Michał Gątkowski
7ff7dc4b06
Fix comment
2022-08-10 01:17:25 +02:00
Michał Gątkowski
f69836ad09
Fix sorting by relevance
2022-08-10 01:04:29 +02:00
Michał Gątkowski
08fd243a20
Fix loading more torrents in conjunction with sorting ( default sorting is broken for now )
2022-08-10 00:11:00 +02:00
Michał Gątkowski
573b5622c8
Remove no-ops
2022-08-09 00:41:16 +02:00
IreuN
65a3285057
PostgreSQL is now fully supported
2022-08-09 00:35:53 +02:00
IreuN
6a298b4a0f
PostgreSQL is now fully supported
2022-08-09 00:32:37 +02:00
Michał Gątkowski
b88b3f5de8
Refactor postgres search
2022-08-08 01:16:45 +02:00
Michał Gątkowski
2838a3cc2a
Improve PostgreSQL serach a little
2022-08-07 23:27:32 +02:00
Michał Gątkowski
c1f5815b4b
Improve PostgreSQL serach a little
2022-08-07 22:14:26 +02:00
Michał Gątkowski
503fe1b8ec
Clean up logs
2022-08-06 15:44:56 +02:00
Michał Gątkowski
791e53c84f
Implemented ( not so great ) search for PostgreSQL
2022-08-05 22:24:55 +02:00
Michał Gątkowski
096777e2da
Implemented GetStatistics for postgreSQL
2022-08-05 17:14:33 +02:00
Michał Gątkowski
fd2ee88e5d
QueryTorrents for postgreSQL - fix loading more torrents
2022-08-05 01:16:48 +02:00
Michał Gątkowski
345901583c
QueryTorrents for postgreSQL - initail implementation
2022-08-04 17:40:59 +02:00
Alexey Skobkin
3dfda7c2be
Beanstalkd engine implementation.
2020-11-29 01:27:55 +03:00
Bora M. Alper
376dba5810
staticcheck guided refactoring
2020-11-27 18:06:43 +00:00
Bora M. Alper
8a9b95300a
pkg/persistence refactoring
2020-11-27 17:55:57 +00:00
Alexey Skobkin
ce393beb5e
Implementing write-only part (magneticod) of the PostgreSQL back-end.
2020-11-23 21:46:53 +03:00
Bora M. Alper
202cfc7c5b
fix formatting
2020-04-16 08:59:25 +03:00
Matt Joiner
29543dae95
Include file: and escape paths passed through to sqlite3
...
Fixes #240 .
2020-02-24 11:40:00 +11:00
Bora M. Alper
d822314aa3
fix typo in pkg/README.md
2019-09-18 12:34:12 +01:00
Bora M. Alper
46e4395786
update stdout db engine output example
2019-09-18 02:24:36 +01:00
Bora M. Alper
f749941ca0
version 0.9.0 and fix stdout hex encoding
2019-09-18 02:13:55 +01:00
Bora M. Alper
c310d993bb
fix formatting in persistence/stdout.go
2019-09-18 02:05:29 +01:00
Bora M. Alper
7c881cae65
add Stdout dummy database engine
2019-09-18 01:51:58 +01:00
Bora M. Alper
06383d1a2e
stylistic changes
2018-12-30 08:25:03 +03:00
Bora M. Alper
e01a3bed40
better error handling at sqlite3.go
2018-12-30 08:24:44 +03:00
Bora M. Alper
e7f5fb0831
better error handling at iso8601
2018-12-30 08:24:33 +03:00
Bora M. Alper
eea341407d
fixed travis, added vet and staticcheck in makefile, modified READMEs
2018-12-30 08:21:56 +03:00
Bora M. Alper
5fd07f7ab5
fixed (v2) "unable to open database file"
2018-12-25 18:34:19 +03:00
Bora M. Alper
64543d71d7
fixed "unable to open database file" (potentially), and errors wrapped in pkg/persistence
2018-12-24 18:27:36 +03:00
Bora Alper
afbe7cd384
persistence: fixed tons of things, read the full description
...
- value returned from last_insert_rowid() is now checked
- INSERT OR IGNORE INTO torrents is removed in favour of explicitly checking if the torrent is in the database
- changed trigger names for keeping 'torrents_idx' up to date
- fixed 'modified_on' once again, but this time for sure (it seems...)
2018-08-16 13:41:25 +03:00
Bora Alper
1ee35d02c6
persistence: fixed nil error on empty 'torrents' and changed "modified_on"
2018-08-15 11:53:07 +03:00
Bora Alper
4b9b354171
fixed some go vet warnings, fixed formatting
2018-08-03 15:40:04 +03:00
Bora Alper
dc420da802
cumulative commit! (see the description for changes)
...
magneticod:
!!! disabled the gradual increase in congestion control, for some reason we still can't detect congestion...
- `*net.UDPAddr` in dht/mainline instead of `net.Addr`
- fixed a bug when a very small extension message received
- simplified how peer adress is handled in bittorrent/metadata/sink
- simplified TrawlingResult in dht/mainline
magneticow:
- use WAL for sqlite3
persistence:
- use URL.String() instead of url.Path in sql.Open() so that URL parameters are not lost...
2018-08-03 11:28:50 +03:00
Bora Alper
c07daa3eca
magneticod: metadata leech refactored heavily, now much more readable <3
...
+ persistence: we now make sure that rows are always closed using `defer`
2018-07-24 15:41:13 +03:00
Bora Alper
a9cf795562
magneticow api is now *completely* done!
2018-07-08 12:08:24 +03:00
Bora Alper
ba1be368cf
magneticow & api: statistics are now working!
2018-07-07 14:56:34 +03:00
Bora Alper
cab54c6ec1
persistence: now using Row Value Comparsions as it should been using
2018-07-01 17:29:42 +03:00
Bora Alper
e20cdca890
magneticow: orderBy now works at API endpoint, no web interface yet
2018-06-29 20:08:00 +03:00
Bora Alper
3a45f17647
now torrent pages work too!
...
- Changed the URL structure of torrent pages:
Before:
/torrents/{{infoHash}}/{{name}}
After:
/torrents/{{infoHash}}
2018-06-29 18:58:57 +03:00
Bora Alper
0501fc3e3c
magneticow: search now works perfectly!
...
- support for ordering is yet to be implemented
2018-06-19 18:49:46 +03:00
Bora Alper
0c54cc80dc
[magneticow] the search now works, but need to change our approach
2018-04-25 21:33:50 +01:00
Bora Alper
ac7d0a514f
QueryTorrents() of sqlite3 is complete! (testing needed)
2018-04-21 10:05:12 +01:00
Bora Alper
7e2a2bc5d9
persistence/sqlite3 torrents_idx FTS5 table is created in user_version 3 (+ some other code improvements)
2018-03-04 11:07:53 +00:00
Bora Alper
ad839ae554
updated comments of QueryTorrents()
and GetTorrent()
in persistence/interface
2018-03-03 22:09:34 +00:00
Bora Alper
5c4d96402d
removed enableFTS
arg in MakeDatabase
2018-03-03 17:11:13 +00:00
Bora Alper
3a886229fc
fixed pkg/persistence/interface.go
2018-03-03 17:09:49 +00:00