* 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
* feat(filters): skip duplicates
* fix: add interface instead of any
* fix(filters): tonullint
* feat(filters): skip dupes check month day
* chore: cleanup
* feat(db): set autoincrement id
* feat(filters): add repack and proper to dupe profile
* feat(filters): add default dupe profiles
* feat(duplicates): check audio and website
* feat(duplicates): update tests
* feat(duplicates): add toggles on addform
* feat(duplicates): fix sqlite upgrade path and initialize duplicate profiles
* feat(duplicates): simplify sqlite upgrade
avoiding temp table and unwieldy select. Besides, FK constraints
are turned off anyway in #229.
* feat(duplicates): change CheckIsDuplicateRelease treatment of PROPER and REPACK
"Proper" and "Repack" are not parallel to the other conditions like "Title",
so they do not belong as dedup conditions. "PROPER" means there was an issue in
the previous release, and so a PROPER is never a duplicate, even if it replaces
another PROPER. Similarly, "REPACK" means there was an issue in the previous
release by that group, and so it is a duplicate only if we previously took a
release from a DIFFERENT group.
I have not removed Proper and Repack from the UI or the schema yet.
* feat(duplicates): update postgres schema to match sqlite
* feat(duplicates): fix web build errors
* feat(duplicates): fix postgres errors
* feat(filters): do leftjoin for duplicate profile
* fix(filters): partial update dupe profile
* go fmt `internal/domain/filter.go`
* feat(duplicates): restore straightforward logic for proper/repack
* feat(duplicates): remove mostly duplicate TV duplicate profiles
Having one profile seems the cleanest. If somebody wants multiple
resolutions then they can add Resolution to the duplicate profile.
Tested this profile with both weekly episodic releases and daily
show releases.
* feat(release): add db indexes and sub_title
* feat(release): add IsDuplicate tests
* feat(release): update action handler
* feat(release): add more tests for skip duplicates
* feat(duplicates): check audio
* feat(duplicates): add more tests
* feat(duplicates): match edition cut and more
* fix(duplicates): tests
* fix(duplicates): missing imports
* fix(duplicates): tests
* feat(duplicates): handle sub_title edition and language in ui
* fix(duplicates): tests
* feat(duplicates): check name against normalized hash
* fix(duplicates): tests
* chore: update .gitignore to ignore .pnpm-store
* fix: tests
* fix(filters): tests
* fix: bad conflict merge
* fix: update release type in test
* fix: use vendored hot-toast
* fix: release_test.go
* fix: rss_test.go
* feat(duplicates): improve title hashing for unique check
* feat(duplicates): further improve title hashing for unique check with lang
* feat(duplicates): fix tests
* feat(duplicates): add macros IsDuplicate and DuplicateProfile ID and name
* feat(duplicates): add normalized hash match option
* fix: headlessui-state prop warning
* fix(duplicates): add missing year in daily ep normalize
* fix(duplicates): check rejections len
---------
Co-authored-by: ze0s <ze0s@riseup.net>
* feat(lists): integrate Omegabrr
* feat(lists): add missing lists index
* feat(lists): add db repo
* feat(lists): add db migrations
* feat(lists): labels
* feat(lists): url lists and more arrs
* fix(lists): db migrations client_id wrong type
* fix(lists): db fields
* feat(lists): create list form wip
* feat(lists): show in list and create
* feat(lists): update and delete
* feat(lists): trigger via webhook
* feat(lists): add webhook handler
* fix(arr): encode json to pointer
* feat(lists): rename endpoint to lists
* feat(lists): fetch tags from arr
* feat(lists): process plaintext lists
* feat(lists): add background refresh job
* run every 6th hour with a random start delay between 1-35 seconds
* feat(lists): refresh on save and improve logging
* feat(lists): cast arr client to pointer
* feat(lists): improve error handling
* feat(lists): reset shows field with match release
* feat(lists): filter opts all lists
* feat(lists): trigger on update if enabled
* feat(lists): update option for lists
* feat(lists): show connected filters in list
* feat(lists): missing listSvc dep
* feat(lists): cleanup
* feat(lists): typo arr list
* feat(lists): radarr include original
* feat(lists): rename ExcludeAlternateTitle to IncludeAlternateTitle
* fix(lists): arr client type conversion to pointer
* fix(actions): only log panic recover if err not nil
* feat(lists): show spinner on save
* feat(lists): show icon in filters list
* feat(lists): change icon color in filters list
* feat(lists): delete relations on filter delete
* feat(auth): implement oidc
* refactor(auth): centralize OIDC state cookie handling
* fix(web): resolve unused error variables in route handlers
* docs(readme): add OIDC authentication feature to list
* fix(auth): improve OIDC cookie handling for reverse proxy setups
The OIDC state cookie's Secure flag is now properly set when running behind a reverse proxy by checking both direct TLS and X-Forwarded-Proto header. This fixes authentication issues in common setups where:
- autobrr runs behind a reverse proxy that terminates HTTPS
- local development environments without TLS
- mixed protocol environments (internal HTTP, external HTTPS)
* fix: use crypt/random if argon2id fails
* feat(auth): show both login options when user exists in db
if user doesn't exist, e.g. canOnboard=true then we only show the OIDC button, since regular login makes no sense in that case
If user does not exist in db and the user wants to create a local user, OIDC needs to be disabled first
* feat(auth): improve OIDC provider initialization with discovery logging
* revert(issuer): do not remove trailing slash
* feat(auth): improve OIDC username resolution with additional claims
* fix(auth): handle OIDC issuer URLs with and without trailing slashes
When initializing the OIDC provider, automatically retry with/without trailing
slash if the first attempt fails.
- First attempts with original issuer URL
- If fails with trailing slash, retries without
- If fails without trailing slash, retries with
* feat(oidc): add gorilla sessions store for secure state management
Add gorilla sessions store to handle encrypted state cookies in OIDC flow,
while removing redundant session validation checks
Co-authored-by: Kyle Sanderson <kyle.leet@gmail.com>
* fix(auth): prevent duplicate OIDC state cookies for authenticated sessions
Modify OIDC config handler to check for existing authenticated sessions
before setting state cookie. Still returns OIDC enabled status to maintain
UI state, but prevents unnecessary cookie creation for authenticated users.
* feat(oidc): use random secret for temporary state cookies
Co-authored-by: Kyle Sanderson <kyle.leet@gmail.com>
* feat(auth): add rate limiting to OIDC endpoints
Co-authored-by: Kyle Sanderson <kyle.leet@gmail.com>
* fix(auth): validate OIDC authorization code presence in callback
Co-authored-by: Kyle Sanderson <kyle.leet@gmail.com>
* fix(auth): properly handle OIDC session errors
Improve error handling in OIDC login flow by properly handling cookie store
session errors. Return HTTP 500 if session cannot be retrieved instead of
silently continuing with potentially invalid state.
Co-authored-by: Kyle Sanderson <kyle.leet@gmail.com>
* feat(auth): track and display authentication method for oidc and password logins
* fix: tests
* docs(readme): add environment variable section
* go mod tidy
* chore: log style and errors
---------
Co-authored-by: Kyle Sanderson <kyle.leet@gmail.com>
Co-authored-by: ze0s <ze0s@riseup.net>
* refactor: remove baseUrl from api calls and sseBaseUrl
* refactor: set cookie session to '/'.
Since that's where the api endpoint is that way we set it to the root domain, we can't set it to the subfolder since the api is called directly now and not using the baseUrl.
* feat: add the baseUrl route.
When user for example is in `/autobrr` and hit reload it should just return the index.html.
* refactor: now it have to be `/autobrr`
Remove the trailing `/`, now base url is set to /autobrr aligned with other arrs.
* refactor: remove baseUrl stuff.
* refactor: use separate router for the api endpoint and the baseUrl.
I don't think we need separate router, but I didn't test it, so feel free to test it and see if it works without the separate router, the whole point was to make sure that it's not prefixed with baseUrl and I noticed that it was being called in the frontend `APIClients.ts`. So yea just check if it works without it then keep the old one.
Also removed the index since it was zombie code not being used anywhere.
* feat: Dynamic base url.
* fix: auth handler deps
* feat(http): mount web and api on baseurl
* feat(http): web api client routes
* feat(http): baseurl legacy mode
* feat(http): baseurl legacy mode test
* feat(http): add assetBaseUrl
* feat(http): try separate web handlers
* feat(http): improve file serving
* feat(http): ignore .gitkeep
* fix(assets): windows paths
* fix(assets): windows paths trimprefix
* fix(assets): windows paths join
* fix(assets): cleanup
* fix(assets): additional web route check
* feat(http): add comments
---------
Co-authored-by: ze0s <ze0s@riseup.net>
* feat(releases): delete based on age/indexer/status
* fix: sanitize releaseStatuses
* swap to RMSC
* add AgeSelect component
* improve texts
* refactor: streamline form layout
* improve text
* remove a paragraph
* improved UX
explaining the options, better error handling
* reinstate red border
* fix: labels to match other similar labels for selects
- improved contrast for the word "required" in desc
- added red asterisk to required select
* minor text improvement to warning
* fix: delete-button vertical alignment
* feat: cleanup queries
* feat: cleanup delete
---------
Co-authored-by: ze0s <ze0s@riseup.net>
* 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>
* 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>
* 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>
* 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>
* 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>
* go indent linting
* getLatest endpoint follows config.CheckForUpdates
* Revert "getLatest endpoint follows config.CheckForUpdates"
This reverts commit 495fabad13b1a96aa83ce50792f5725e9b51061a.
* getLatestRelease follows config.check_for_updates
* revert: rename data - less changes to conflict
* fixup: revert: rename data - less changes to conflict
* change queryFn to arrow function
* 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>
* 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>