* fix some races in IRC handler management
* remove go 1.21 and slices package
* chore: update deps
* fix: use exp/slices pkg and client callbacks
* fix(irc): remove deadlock mutex from authenticate
* restore locking in authenticate()
* fix(irc): data races
* fix(irc): do not allow restart of disabled network
* fix(irc): disable restart btn if net disabled
---------
Co-authored-by: ze0s <43699394+zze0s@users.noreply.github.com>
* fix(database): hot fix for deleting filter.
This fixes the no sql row set, no idea why it does that but removing the row check I added fixes it, Not sure if it affects others rowsAffected in the delete function.
* fix: imports
---------
Co-authored-by: ze0s <43699394+zze0s@users.noreply.github.com>
refactor: copylocks and staticcheck findings
Refactor mutex handling, optimize byte slice creation, and clean up code in accordance with go.staticcheck and copylocks guidelines.
- Changed AppConfig's mutex to *sync.Mutex, preventing mutex copying and enhancing thread safety.
- Simplified byte slice initialization in writeConfig for efficiency.
- Removed redundant return in DynamicReload for better code clarity.
* feat(feeds): add force run
* fix: simplify ForceRun
* add confirmation modal
* handle errors by using the test func
* require user input to run
* make sure to reschedule next job after forcerun
* refactor modal centering with grid
* refactor: Simplify startJob and forceRun logic
- Refactor `startJob` to accept a `runImmediately` flag. This flag controls whether the job should be run immediately or scheduled for later. This change simplifies the `ForceRun` function by allowing it to call `startJob` with `runImmediately` set to `true`.
- Remove redundant checks in `ForceRun` related to feed type. These checks are handled in `startJob`.
BREAKING CHANGE: The `startJob` function now requires a second argument, `runImmediately`. This change affects all calls to `startJob`.
* fix(web) Invalidate queries after forceRun
* refactor(feeds): init and test run
---------
Co-authored-by: ze0s <43699394+zze0s@users.noreply.github.com>
* 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>
* Various WebUI changes and fixes.
* feat(tooltip): make tooltip display upwards
* fix(tooltip): place tooltip to the right
* fix(web): add missing ml-px to SwitchGroup header
current: https://i.imgur.com/2WXstPV.png
new: https://i.imgur.com/QGQ49mP.png
* fix(web): collapse sections
* fix(web): improve freeleech section
* fix(web): rename action to action_components
Renamed the 'action' folder to 'action_components' to resolve import issues due to case sensitivity.
* fix(web): align CollapsibleSection
Old Advanced tab: https://i.imgur.com/MXaJ5eJ.png
New Advanced tab: https://i.imgur.com/4nPJJRw.png
Music tab for comparison: https://i.imgur.com/I59X7ot.png
* fix(web): remove invalid CSS class
* revert: vertical padding on switchgroup
added py-0 on the freeleech part instead
* feat(settings): add back log files
* fix(settings): irc channels and font sizes
* fix(components): radio select roundness
* fix(styling): various minor changes
* fix(filters): remove jitter fields
---------
Co-authored-by: ze0s <43699394+zze0s@users.noreply.github.com>
Co-authored-by: soup <soup@r4tio.dev>
Co-authored-by: ze0s <ze0s@riseup.net>
Update myanonamouse.yaml to have the right mam_id format
Autobrr's Discord had a user indicate that the format needs to be "mam_id=$id;"
The $id being the one created in the Preferences > Security in MAM website for the relevant IP.
* feat(indexers): add TheOldSchool
* change language code
remove unneeded lazy modifiers
account for empty parenthesis
account for miscellaneous character in usernames
make compatible with PCRE flavors
---------
Co-authored-by: martylukyy <35452459+martylukyy@users.noreply.github.com>
* 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
* Update subsplease.yaml regex to parse title
This change aims to parse any multiple-word title to populate the title macro.
* Update subsplease.yaml also captures title for batch releases
I replaced the (.*?) part with ([^-()]+), which matches one or more characters that are not dashes or parentheses. This will stop at either a dash - or an opening parenthesis (
* Parsing title by matching a sequence instead of using a character class
Using whitespace - (dash) whitespace numerical or whitespace ( (open bracket) numerical to end the title pattern
* specify character amount of `\d` token
---------
Co-authored-by: martylukyy <35452459+martylukyy@users.noreply.github.com>
* 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>
* In rss feeds, sometimes the only place the size is mentioned is in the
description field. If the size has not already been determined from
another source try to read it from there.
* Accept sizes with no space between value and unit of measure
* feat(feeds): get size from description add test
* fix(feeds): tests
---------
Co-authored-by: ze0s <ze0s@riseup.net>