* 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>
* factor out test helpers
* refactor, add tests for animebytes
* revert test refactor
* better name
* change format, migrate some examples
* migrated remaining test cases
* add comment about `Test` vs `Tests`
* refactor
* reorder expectations to match vars
* generate
* turn on strict unmarshalling, remove old `Test` from schema
* start modifying actual definitions
* done with the As
* Bs
* C, D
* E, F
* G, H, I, ... L
* M, N
* O, P
* R
* bonus error. without this, pattern/vars disagreement can panic.
* S
* T, U
* X.. Now we know our ABCs next time won't you sing with meeeee
* fix another test
* another driveby change
* be less strict parsing custom definitions
* fix(definitions): load custom definitions
---------
Co-authored-by: ze0s <ze0s@riseup.net>
* feat(feeds): improve caching
* fix(feeds): put cache if not empty
* fix(feeds): reassign loop var
* fix(feeds): enable busy_timeout again
* fix(feeds): enable busy_timeout again
* fix(releases): search with postgres
* fix: validate release push status from filters
* fix: add missing import
* fix: validate push status if not empty
* chore(indexers): replace array position with id
* fix(indexers): enable and disable without editing
* feat(indexer): add toggle endpoint and refactoring
---------
Co-authored-by: ze0s <ze0s@riseup.net>
* 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
* fix(release): DeleteOlder func for zero duration
resolves a bug in the `DeleteOlder` function where recent 24-hour data wasn't deleted when set to `delete everything`. We now correctly set the olderThanTimestamp to a future date when duration is zero, ensuring complete deletion of all records.
* fix(releases): delete older
---------
Co-authored-by: ze0s <ze0s@riseup.net>
* fix(debug/release/rejection): cap line length at 1KB from unlimited
* flip to a call limit
* dont die on bad metainfo parse
* death is here to stay, for now.
* improve content type check
checks if torrent file is a valid torrent file when content-type is text/html
* optimize content type check and file handling
* attempt to write tests
* small changes to error messages
* fix: download file content type checks
---------
Co-authored-by: Kyle Sanderson <kyle.leet@gmail.com>
Co-authored-by: ze0s <43699394+zze0s@users.noreply.github.com>
* feat: delete releases older than x
* check timestamp
* incomplete front end changes
commiting changes from codespace to not lose them
* change to dropdown with options
* using int comparisons to avoid nightmares
* Revert "using int comparisons to avoid nightmares"
This reverts commit dc55966a73e9f6ad79ed28c3a3e0dbe0e35448a6.
* suggestions by stacksmash76
come back to discord @stacksmash76
* Curves - a touch of warmth in our pixel realm
* replace inline css with tailwind
* remove unnecessary comment
* align label with dropdown
changed first paragraph to something more sensible
* change font weight for duration label
* padding changes
* nitpicky
* merged divs where possible
* small adjustments for light theme
* attempt to fix for postgres
* refactor: split into component and add confirmation modal
also restyle component
* fix: go fmt
---------
Co-authored-by: ze0s <43699394+zze0s@users.noreply.github.com>
* feat(notification): send Telegram messages to a specific topic of a group
* Convert settings.Topic to integer once and reuse it as part of the
telegramSender struct.
* feat(notifications): add migrations for topic
* fix(notifications): find null string
* fix(notifications): form initial values
---------
Co-authored-by: ze0s <ze0s@riseup.net>
* feat/check-content-type-torrent-download
* check for text/html instead
* check for status codes above 308
* refactor
* make sure < 499 goes to content-type check
* fix content header check by accounting for charset
* retry on 404
* change to errors.New for 404
* make use of verbs
* handle http errors as cases
* check contentType with strings.Contains instead
* adjust message for unauthorized and forbidden
---------
Co-authored-by: ze0s <43699394+zze0s@users.noreply.github.com>
* speculative fix for tags_match_logic if set to ANY
* add default tag match logic handling
* fixed test cases and rejection messages
* trim tags in match funcs
* add test for empty TagsMatchLogic
* fix(releases): max downloads per hour
* refactor: release processing
* compare apples to apples (#884)
* from rocketships back to apples
* Update internal/database/filter.go
* cast me to the
* keep your eye on the case
---------
Co-authored-by: Kyle Sanderson <kyle.leet@gmail.com>
* feat(notifications): add pushover
* add db migration
* fix lint error
* some small corrections
* fixed README
* added missing columns to postgres_migrate.go
* use token for user_key
* refactor(notifications): change priority to int
* fix: only test selected events
---------
Co-authored-by: soup <soup@r4tio.dev>
Co-authored-by: ze0s <ze0s@riseup.net>
* refactor(indexers): test api clients
* feat(indexers): test api connection
* fix(indexers): api client tests
* refactor: indexer api clients
* feat: add Toasts for indexer api tests
* fix: failing red tests
* feat(filters): add fields for tag and except tag matching logic
* refactor(filters): rearrange and simplify logic for containsAllMatch
---------
Co-authored-by: Gustavo Machado <me@gstv.dev>
* fix(tags): fixed `24bit Lossless` being tagged as `Lossless`
added negation to the Lossless regex to prevent it from matching 24bit Lossless
* fix(tests): modified test to reflect changes in regex