Commit graph

256 commits

Author SHA1 Message Date
Brandon Beck
3c40c7bba8
feat(macros): add FilterID (#1416) 2024-02-20 16:35:00 +01:00
ze0s
51a7f71372
fix(filters): OPS and RED split Artist and Album (#1398)
* fix(filters): OPS and RED parse and match Artist and Album

* fix(filters): rls raw
2024-02-12 14:16:16 +01:00
martylukyy
1a23b69bcf
feat(web): move from react-router to @tanstack/router (#1338)
* fix(auth): invalid cookie handling and wrongful basic auth invalidation

* fix(auth): fix test to reflect new HTTP status code

* fix(auth/web): do not throw on error

* fix(http): replace http codes in middleware to prevent basic auth invalidation
fix typo in comment

* fix test

* fix(web): api client handle 403

* refactor(http): auth_test use testify.assert

* refactor(http): set session opts after valid login

* refactor(http): send more client headers

* fix(http): test

* refactor(web): move router to tanstack/router

* refactor(web): use route loaders and suspense

* refactor(web): useSuspense for settings

* refactor(web): invalidate cookie in middleware

* fix: loclfile

* fix: load filter/id

* fix(web): login, onboard, types, imports

* fix(web): filter load

* fix(web): build errors

* fix(web): ts-expect-error

* fix(tests): filter_test.go

* fix(filters): tests

* refactor: remove duplicate spinner components
refactor: ReleaseTable.tsx loading animation
refactor: remove dedicated `pendingComponent` for `settingsRoute`

* fix: refactor missed SectionLoader to RingResizeSpinner

* fix: substitute divides with borders to account for unloaded elements

* fix(api): action status URL param

* revert: action status URL param
add comment

* fix(routing): notfound handling and split files

* fix(filters): notfound get params

* fix(queries): colon

* fix(queries): comments ts-ignore

* fix(queries): extract queryKeys

* fix(queries): remove err

* fix(routes): move zob schema inline

* fix(auth): middleware and redirect to login

* fix(auth): failing test

* fix(logs): invalidate correct key

* fix(logs): invalidate correct key

* fix(logs): invalidate correct key

* fix: JSX element stealing focus from searchbar

* reimplement empty release table state text

* fix(context): use deep-copy

* fix(releases): empty state and filter input warnings

* fix(releases): empty states

* fix(auth): onboarding

* fix(cache): invalidate queries

---------

Co-authored-by: ze0s <43699394+zze0s@users.noreply.github.com>
2024-02-12 13:07:00 +01:00
Brandon Beck
90272188ca
feat(macros): add Type (#1394) 2024-02-08 14:39:49 +01:00
ze0s
5328078b32
fix(filters): RED and OPS lossless parsing and filtering (#1373)
* fix(filters): RED and OPS lossless parsing and filtering

* fix(filters): logscore and EP parsing

* fix(filters): tests

* fix(filters): tests

* feat(definitions): RED parse title variable

* feat(indexers): setup indexer to filter tests

* feat(indexers): tests and improve parsing

* feat(indexers): improve tests
2024-01-28 22:03:25 +01:00
Vince Villamora
16bf2a52fd
feat(macros): add Group (#1378) 2024-01-26 16:26:18 +01:00
ze0s
fffd5bbf56
feat(indexers): GGn improve release name parsing (#1366)
* feat(indexers): GGn improve IRC parsing

* chore: organize imports
2024-01-24 17:58:46 +01:00
luckyboy
a86258aaa7
feat(filters): implement min and max seeders/leechers filtering for Torznab feeds (#1342)
* feat(filter):implement min and max seeders/leechers filtering

* chore: go fmt and reorder fields

---------

Co-authored-by: ze0s <ze0s@riseup.net>
2024-01-12 17:08:18 +01:00
ze0s
9992675971
feat(releases): show details in list view (#1337)
* feat(releases): show details in list view

* fix(releases): activitytable columns type

* fix(releases): incognito mode

* feat(releases): move details button

* do we wanna truncate?

* fix(web): release column width at full size

---------

Co-authored-by: martylukyy <35452459+martylukyy@users.noreply.github.com>
2024-01-02 21:53:38 +01:00
ze0s
fbabdfb217
feat(clients): override arr download client by name (#1328)
* feat(clients): override arr client by name

* feat(clients): add missing file

* feat(clients): add section download client arr
2024-01-01 17:57:19 +01: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
ze0s
57a91bb99a
feat(notifications): add Shoutrrr support (#1326) 2023-12-30 16:34:25 +01:00
ze0s
3dd1629a3f
feat(notifications): add ntfy support (#1323)
* feat(notifications): add ntfy support

* fix(test): update

* fix: added missing semicolon
2023-12-30 13:49:06 +01:00
Kyle Sanderson
3234f0d919
refactor(http): implement shared transport and clients (#1288)
* fix(http): flip to a shared transport and clients

* nice threads

* that is terrible

* fake uri for magnet

* lazy locking

* why bother with r's

* flip magic params to struct

* refactor(http-clients): use separate clients with shared transport

* refactor(http-clients): add missing license header

* refactor(http-clients): defer and fix errors

---------

Co-authored-by: ze0s <ze0s@riseup.net>
2023-12-29 23:49:22 +01:00
KaiserBh
df2612602b
feat(auth): change password and username (#1295)
* feat(backend): added change password api endpoint.

* feat(web): added profile UI to change password.

I think we can change the username too, but I don't know if we should for now disabled the username field.

* refactor: don't leak username or password.

* refactor: protect the route.

* generic

* feat: add ChangeUsername

* fix(tests): speculative fix for TestUserRepo_Update

* Revert "feat: add ChangeUsername"

This reverts commit d4c1645002883a278aa45dec3c8c19fa1cc75d9b.

* refactor into 1 endpoint that handles both

* feat: added option to change username as well. :pain:

* refactor: frontend

* refactor: function names in backend

I think this makes it more clear what their function is

* fix: change to 2 cols with separator

* refactor: update user

* fix: test db create user

---------

Co-authored-by: Kyle Sanderson <kyle.leet@gmail.com>
Co-authored-by: soup <soup@r4tio.dev>
Co-authored-by: martylukyy <35452459+martylukyy@users.noreply.github.com>
Co-authored-by: ze0s <ze0s@riseup.net>
2023-12-26 15:50:57 +01:00
Frederick Robinson
d898b3cd8d
refactor(filters): checkMaxDownloads (#1285)
* refactor

* fix: comment

---------

Co-authored-by: ze0s <43699394+zze0s@users.noreply.github.com>
2023-12-25 22:54:52 +01:00
soup
c6122dbc41
feat(actions): qBittorrent add priority handling (#1315)
* feat(qbittorrent): add priority handling

* fix: check if torrent queueing is enabled

* fix: only check for torrent queueing if priority is set

* fix: improve tooltip message

* feat: enable torrent queueing if disabled

* change to SetPreferencesQueueingEnabled

* feat(actions): rename field

* chore: bump pkg go-qbittorrent to v1.8.0

* chore(deps): update go-qbittorrent to v1.8.1

* chore(deps): go mod tidy

---------

Co-authored-by: ze0s <ze0s@riseup.net>
2023-12-25 22:39:31 +01:00
Rohit Vardam
1563ce5e9f
fix(filters): do not split commas inside valid Regexp (#1212)
* fix(filter): matchRegex

* fix(filter): matchRegex use new splitter
2023-12-25 15:45:50 +01:00
soup
3b60365483
feat(web): link Dashboard stats to Releases page (#1281)
* feat(web): link stats to release table

- added Errored Pushes
- Made Recent Activity same color as Stats

* feat(releasetable): made links a separate row

https://i.imgur.com/ZoAOrXP.png

remove comment

* added LinkIcon to StatsItem

- Changed grid-cols to 2, as we now have 4 for narrow widths

* fix linting

* move some text modifier to parent element

* feat: add scale on hover with transition

deduplicated some classes

* adapt gap between StatsItems for mobile
remove border and title on stats divs

---------

Co-authored-by: Fabricio Silva <hi@fabricio.dev>
Co-authored-by: martylukyy <35452459+martylukyy@users.noreply.github.com>
2023-12-25 14:03:29 +01:00
soup
6e12654f6a
feat(filters): show enabled and disabled actions in list view (#1304)
* feat(filters): reflect enabled actions

* dont store release unless enabled action found

* store the release after the delay

* add new parameter to FindByFilterID method
2023-12-17 21:18:26 +01:00
soup
a89a1a55d9
feat(notifications): add LunaSea support (#1284)
* feat(notifications): add lunasea

* fix(web): truncate overflow in PasswordFieldWide

* refactor(notifications): centralize msg building

Left the building logic in discord.go and notifiarr.go as is because of their unique structure.

* refactor: moved components and swapped to outline

- Refactored the iconComponentMap to use a single iconStyle variable.

* upped size from 4 to 5

* rename NotificationBuilder function
2023-12-15 23:13:44 +01:00
soup
fc0bf33412
fix(config): PostgresExtraParams struct tag (#1294)
fix: PostgresExtraParams to lowercase in Config
2023-12-12 20:35:12 +01:00
Frederick Robinson
365055fbe1
refactor(filters): move rejections from release to filter (#1272)
* refactor: size check

* refactor(filters): checkfilter rejections from release to filter

---------

Co-authored-by: ze0s <ze0s@riseup.net>
2023-12-01 18:04:23 +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
Frederick Robinson
8d3921fd3b
feat(filters): validate filter size (#1263)
* update comments

* refactor, fail on malformed size constraints

* refactor validation, add failing test

* unify in ReleaseSizeOkay, refactor test

* validate filter limit parseability

* logging improvement

* refactor. more clear, explicit parsing step

* inline, add log

* comment tweak

* pass error with more info

* tweak parsedSizeLimits interface
2023-11-20 18:41:53 +01:00
Fabricio Silva
8a8069408a
fix(indexers): toggle state (#1214)
* fix(indexers): toggle state

* fix(indexers): toggle state

---------

Co-authored-by: ze0s <43699394+zze0s@users.noreply.github.com>
2023-11-19 23:11:12 +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
Frederick Robinson
fef0da5711
feat(definitions): add expectations for test lines (#1257)
* 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>
2023-11-18 15:41:39 +01:00
Steven Kreitzer
c5fb92ccf4
fix(filters): external webhook remove jitter (#1254)
* fix(filters): external webhook remove jitter

* fix: migrations

---------

Co-authored-by: ze0s <ze0s@riseup.net>
2023-11-17 17:05:29 +01:00
Antoine
73e76c4214
feat(database): postgres set ssl mode (#1245)
* feat(database): postgres set ssl mode

* feat(database): postgres set extra params
2023-11-06 19:04:32 +01:00
Steven Kreitzer
2080136669
feat(filters): external webhook retry on status codes (#1206)
* feat: external filter retry status codes

* chore: go mod tidy

* fix(database): migrations

---------

Co-authored-by: ze0s <ze0s@riseup.net>
2023-10-27 17:37:57 +02:00
martylukyy
d1fa1b7cdf
feat(indexers): BHD freeleech announces (#1216)
* feat(indexers): BHD freeleech announces

* feat: parse and map bhd freeleech

---------

Co-authored-by: ze0s <ze0s@riseup.net>
2023-10-26 22:30:28 +02:00
ze0s
9793764905
feat(feeds): improve caching (#1191)
* 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
2023-10-21 17:03:52 +02:00
ze0s
06b864da4d
fix(releases): search with postgres (#1181)
* fix(releases): search with postgres

* fix: validate release push status from filters

* fix: add missing import

* fix: validate push status if not empty
2023-10-16 20:27:15 +02:00
MouldWarpMole
77948d7654
feat(notifications): Add Gotify (#1180)
feat(notifications): Add Gotify (resolves #513)
2023-10-14 12:08:12 +02:00
Fabricio Silva
8600d3a2ab
fix(indexes): toggle on and off with switch (#1164)
* 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>
2023-10-03 21:57:11 +02:00
ze0s
0d3e10f094
feat(downloadclient): set downloadClientId for arr clients (#1081)
feat(downloadclient): arrs set downloadClientId
2023-09-03 15:34:55 +02:00
ze0s
1bfbe38335
feat(macros): add SizeString DownloadURL and InfoURL (#1080)
* feat(macro): add new variables

* SizeString
* DownloadURL
* InfoURL

* feat(macro): add new test cases
2023-09-03 13:27:47 +02:00
ze0s
a6d789ee44
feat(feeds): show next run (#1074) 2023-09-02 23:06:21 +02:00
ze0s
6fd8626507
feat(feeds): add scheduled cleanup (#1073)
* refactor(feeds): make feed scheduling more robust

* feat(feeds): add daily cleanup job

* removes feed cache older than 30 days

* fix(feeds): fmt wrong type
2023-09-02 22:44:28 +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
dde0d0ed61
feat(filters): add support for multiple external filters (#1030)
* feat(filters): add support for multiple ext filters

* refactor(filters): crud and check

* feat(filters): add postgres migrations

* fix(filters): field array types

* fix(filters): formatting

* fix(filters): formatting

* feat(filters): external webhook improve logs
2023-08-15 23:07:39 +02:00
soup
e6f32596a1
fix(releases): delete older than X (#993)
* 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>
2023-07-22 14:49:28 +02:00
Kyle Sanderson
5cdf68bc77
fix(logs): release rejections cap line length at 1KB (#997)
* 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.
2023-07-02 13:58:40 +02:00
soup
1fbf3c828e
feat(filter): add rejection on invalid size set (#991)
* feat(filter): add rejection on invalid size set

* return false
2023-06-19 18:44:34 +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
1f8804154e fix(releases): download file follow redirects (#950) 2023-06-14 21:58:56 +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
soup
28f0b878e1
feat(releases): torrent file downloads improve error handling (#950)
* 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>
2023-06-14 19:55:34 +02:00
soup
f774831d76
feat(releases): delete older than x (#924)
* 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>
2023-05-21 18:39:28 +02:00