Commit graph

28 commits

Author SHA1 Message Date
soup
0391629862
chore(license): update copyright year in headers (#1929)
* chore: update copyright year in license headers

* Revert "chore: update copyright year in license headers"

This reverts commit 3e58129c431b9a491089ce36b908f9bb6ba38ed3.

* chore: update copyright year in license headers

* fix: sort go imports

* fix: add missing license headers
2025-01-06 22:23:19 +01:00
ze0s
bc0f4cc055
feat: add support for proxies to use with IRC and Indexers (#1421)
* feat: add support for proxies

* fix(http): release handler

* fix(migrations): define proxy early

* fix(migrations): pg proxy

* fix(proxy): list update delete

* fix(proxy): remove log and imports

* feat(irc): use proxy

* feat(irc): tests

* fix(web): update imports for ProxyForms.tsx

* fix(database): migration

* feat(proxy): test

* feat(proxy): validate proxy type

* feat(proxy): validate and test

* feat(proxy): improve validate and test

* feat(proxy): fix db schema

* feat(proxy): add db tests

* feat(proxy): handle http errors

* fix(http): imports

* feat(proxy): use proxy for indexer downloads

* feat(proxy): indexerforms select proxy

* feat(proxy): handle torrent download

* feat(proxy): skip if disabled

* feat(proxy): imports

* feat(proxy): implement in Feeds

* feat(proxy): update helper text indexer proxy

* feat(proxy): add internal cache
2024-09-02 11:10:45 +02:00
ze0s
accc875960
feat(database): improve error handling (#1633) 2024-08-29 09:00:53 +02:00
ze0s
45b522abf8
chore: update license header year (#1332)
* chore: update license header year

* chore: update license header year tsx files

* chore: update license header
2024-01-01 16:21:02 +01:00
Kuredant
f89a25d645
feat(irc): support optional bot mode (#1246)
* feat(irc): set bot mode when the server supports it

See https://ircv3.net/specs/extensions/bot-mode.

* feat(irc): add a config option per network for bot mode
2023-11-22 19:57:16 +01:00
KaiserBh
666bdf68cd
feat(database): setup integration tests (#1118)
* refactor: this should be Debug() just like the rest.

* feat: catch error when updating client table.

Before if we provided the wrong ID it will just say it's successful when it shouldn't.

* chore: handle the errors.

* fix: defer tx.Rollback().

When I try handling the error we always hit the error no matter what even though there wasn't any error, This is due that defer block being executed unconditionally so even after we commit it successfully it will just give error. So add checking then commit it if all good.

* feat: added testing env.

This way we can use in memory sqlite.

* chore: Delete log should be debug as well.

* feat: enable foreign keys for testing for sqlite.

I recommend enabling all together. Not sure why it's commented but for now will keep it the same and only enable for testing.

* chore: catch error, if deleting a record fails.

* chore: catch error, if deleting a record fails.

* chore: catch error, when failed to enable toggle.

* chore: catch error, if updating failed.

* chore(filter): catch error, if deleting failed.

* chore(filter): catch error, if row is not modified for ToggleEnabled.

* chore(feed): Should be debug level to match with others.

* chore(feed): catch error when nothing is updated.

* chore: update docker-compose.yml add test_db for postgres.

* chore(ci): update include postgres db service before running tests.

* feat(database): Added database testing.

* feat(database): Added api integration testing.

* feat(database): Added action integration testing.

* feat(database): Added download_client integration testing.

* feat(database): Added filter integration testing.

* test(database): initial tests model (WIP)

* chore(feed): handle error when nothing is deleted.

* tests(feed): added delete testing.

* chore(feed): handle error when nothing is updated.

* chore(feed): handle error when nothing is updated.

* chore(feed): handle error when nothing is updated.

* feat(database): Added feed integration testing.

* fix(feed_cache): This should be time.Time not time.Duration.

* chore(feed_cache): handle error when deleting fails.

* feat(database): Added feed_cache integration testing.

* chore: add EOL

* feat: added indexer_test.go

* feat: added mock irc data

* fix: the column is not pass anymore it's password.

* chore: added assertion.

* fix: This is password column not pass test is failing because of it.

* feat: added tests cases for irc.

* feat: added test cases for release.

* feat: added test cases for notifications.

* feat: added Delete to the User DB that way it can be used for testing.

* feat: added user database tests.

* refactor: Make setupLogger and setupDatabase private also renamed them.

Changed the visibility of `setupLogger` to private based on feedback. Also renamed the function to `setupLoggerForTest` and `setupDatabaseForTest` to make its purpose more descriptive.

* fix(database): tests postgres ssl mode disable

* refactor(database): setup and teardown

---------

Co-authored-by: ze0s <43699394+zze0s@users.noreply.github.com>
2023-11-18 20:04:30 +01:00
ze0s
1a48316233
fix(irc): merge with existing network (#1085)
* fix(irc): merge with existing network

* fix(irc): log format wrong type
2023-09-07 17:48:07 +02:00
ze0s
3e244fac10
fix(filters): store and update with no external filters (#1049)
* fix(filters): store and update

* fix(filters): bad fmt var

* fix(filters): store expect status

* fix(filters): store expect status

* fix(filters): external filter always rejected
2023-08-17 21:42:43 +02:00
ze0s
2af0021ce6
fix(irc): panic when creating indexer with irc (#986)
fix(irc): store channel panic
2023-06-15 18:47:47 +02:00
ze0s
2677c16ff8
feat(irc): add bouncer/znc support (#951)
* feat(irc): add initial bouncer support

* feat(irc): add bouncer fields to irc update form

* fix: make fields optional

* feat(db): add migrations
2023-06-14 21:06:28 +02:00
ze0s
ccabe96bdf
feat(irc): view announces per channel (#948)
* feat(irc): add sse to handler

* feat(irc): view and send irc messages per network

* refactor(irc): use id as handlerkey

* refactor(irc): use id as handlerkey

* feat(web): add irc context

* refactor: create sse stream per network channel

* fix(irc): remove non-working wildcard callback handler

* feat: use fork of sse

* chore(deps): update ergo/irc-go to v0.3.0

* fix: clean irc msg before sse publish

* feat: add view channel button

* feat: styling improvements

* feat: show time
2023-05-21 15:51:40 +02:00
ze0s
604c7896bd
chore: add LICENSE GPLv2-or-later (#897)
* chore: add LICENSE

* chore: add LICENSE to README
2023-05-01 16:21:59 +02:00
Kyle Sanderson
19b3899a5c
refactor(database): clean-up queries (#569)
* fix(database): build WHERE using squirrel

* flip LIKEs

* change sql.LevelReadCommitted

* feat(db): add missing commits

* implement single query for releases

* cleanup

* feat(releases): properly handle limit for Find

* feat(releases): make dynamic ILike helper

* feat(releases): check for empty ReleaseActionStatus

* add values as sql.NullX
* check if ID is non 0

* feat(releases): improve find
2022-12-30 23:53:45 +01:00
ze0s
4bf023d030
feat(irc): support optional SASL and NickServ auth (#511)
* feat(irc): support SASL and NickServ auth

* feat(irc): add missing fields

* feat(irc): support SASL and NickServ auth

* feat(irc): add missing fields

* feat(irc): add validation

* feat(indexers): unify and set required values

* feat(irc): add postgres migrations

* feat(irc): use nick as handlerkey

* feat(irc): use account for nickserv

* fix(irc): pg db migration
2022-10-27 22:25:58 +02:00
Ludvig Lundgren
0e88117702
feat(logging); improve messages and errors (#336)
* feat(logger): add module context

* feat(logger): change errors package

* feat(logger): update tests
2022-07-05 13:31:44 +02:00
Ludvig Lundgren
df7a51d479
fix(irc): append invite command on add (#297) 2022-06-11 02:05:31 +02:00
Ludvig Lundgren
91b094f4f4
feat(confg): reload on save and refactor logging (#275)
* feat(confg): reload on save

* refactor(logging): rework
2022-05-20 09:27:01 +02:00
Ludvig Lundgren
3185832708
feat: add postgres support (#215)
* feat: add postgres support and refactor

* feat: improve releases find

* fix: autobrrctl create user
2022-04-02 19:24:23 +02:00
Ludvig Lundgren
cc0c071cce feat: wip postgres support 2022-03-27 03:12:00 +02:00
Ludvig Lundgren
22f768148c
fix(irc): join channel with password (#190) 2022-03-21 17:39:59 +01:00
Ludvig Lundgren
2daeedbdc7
Feature: Support multi user per irc network (#78)
* feat: delete irc network in transaction

* feat: use compound key for irc handlers

* chore: update deps

* refactor: start network

* refactor: init irc handler

* indexers: update network name
2022-01-13 21:26:23 +01:00
Ludvig Lundgren
f466657ed4
Fix: Performance issues and sqlite locking (#74)
* fix: performance issues and sqlite locking

* fix: dashboard release stats was reversed

* refactor: open and migrate db

* chore: cleanup
2022-01-11 19:35:27 +01:00
GregTroar
d2aa7c1e7e
feat: indexer irc order by name ASC (#65) 2022-01-03 15:33:02 +01:00
Ludvig Lundgren
e1ef47e09a
fix: store filter actions (#54) 2021-12-27 15:14:39 +01:00
Ludvig Lundgren
c4d580eb03
Feature: Support multiline irc parsing (#39)
* feat: initial multiline support

* refactor: handle multiple indexers per network

* wip: setup indexer

* build: add docker compose for testing

* chore: remove temp mock indexers

* chore: update deps

* refactor: update and store network handler

* build: update test compose

* chore: minor cleanup
2021-12-21 21:15:42 +01:00
Ludvig Lundgren
7177e48c02
Feature: Save releases (#36)
* chore: tidy deps

* refactor: database migration

* refactor: store release

* refactor: save release

* chore: add packages

* feat(web): show stats and recent releases

* refactor: simply filter struct

* feat: add eventbus

* chore: cleanup logging

* chore: update packages
2021-11-24 23:18:12 +01:00
Ludvig Lundgren
4d40d41628
Refactor irc client (#19)
* refactor: update http handlers

* feat: add trace log level

* refactir: irc handler

* refactor(definitions): add irc settings and invite cmd:

* feat: add dft values to inputs

* refactor: indexer irc forms

* refactor(definitions): fix nickserv.password var:

* feat: pre fill indexer name field

* refactor: handle stopping and updates
2021-08-29 23:23:02 +02:00
Ludvig Lundgren
a838d994a6 feat: add backend 2021-08-11 15:26:17 +02:00