Commit graph

752 commits

Author SHA1 Message Date
nuxen
e581d14066
refactor(lists): title variation processing (#1965)
refactor(lists): remove code duplication from title processing
2025-02-13 21:03:29 +01:00
locke69321
06229edb55
docs(indexers): update MAM cookie help text (#1968)
Updated Cookie Help Text

Updated the help text to include how to generate the session properly tied to the IP address that Autobrr is running from.
2025-02-13 20:46:45 +01:00
martylukyy
5b7268da22
feat(indexers): add HDB parse Exclusive as tag (#1969)
feat(indexers): add HDB "Exclusive" as tag
2025-02-13 20:40:12 +01:00
martylukyy
6e77f0339b
refactor(lists): title character filtering (#1955) 2025-02-08 14:16:54 +01:00
martylukyy
4fbaa0b72c
fix(indexers): fuzer regex pattern (#1964) 2025-02-08 14:15:20 +01:00
Fabricio Silva
b724429b97
feat(lists): add anilist support (#1949)
* fix(lists): clear selected list

* chore(web): improve onChange set values for select_wide

* feat(web): add anilist lists

* feat(web): Filter is required on ListForm

* fix(web): ListForm reset url when change type

* feat(lists): add anilist support

* feat(lists): filter duplicates for anilist

* feat(anilist): handle special characters

* fix(lists): better title matching
fix(lists): add alternatives to apostrophe replacement

* test(title): add some anime cases

* feat(anilist): replace unicodes with regex

* feat(lists): move additional anilist processing to autobrr instead of brr api

* feat(lists): clean Unicode Block “Latin Extended-A” chars

---------

Co-authored-by: martylukyy <35452459+martylukyy@users.noreply.github.com>
2025-01-31 19:17:23 +01:00
soup
024371e4eb
feat(auth): add option to disable built-in login when using OIDC (#1908)
* feat(auth): disable built-in login by config

* cleanup config

* fix(web): prevent login form flash by waiting for OIDC config

* refactor(config): standardize OIDC TOML format

- Adds camelCase TOML tags to OIDC config struct while keeping mapstructure tags for backward compatibility
- Updates config template to use camelCase format

* refactor: kyles changes

* refactor: prefix disablebuiltinlogin with oidc

* docs: revert format change

---------

Co-authored-by: ze0s <43699394+zze0s@users.noreply.github.com>
2025-01-26 15:25:34 +01:00
ze0s
9eff694a5f
fix(notifications): update and list password (#1951) 2025-01-25 18:34:49 +01:00
Antoine
3f8bc0140c
feat(metrics): add metrics server (#1930)
* feat(metrics): add metrics server

* chore: update license headers

* feat(metrics): add optional basic auth

* feat(metrics): add go and process collectors

---------

Co-authored-by: ze0s <43699394+zze0s@users.noreply.github.com>
Co-authored-by: ze0s <ze0s@riseup.net>
2025-01-25 17:58:18 +01:00
soup
f308286484
fix(feeds): handle unicode escaped url characters (#1942)
* fix(rss): handle unicode escaped url characters

* refactor: simplify URL encoding function name

Co-authored-by: nuxen <47067662+nuxencs@users.noreply.github.com>

* feat(feeds): sanitize download url

---------

Co-authored-by: nuxen <47067662+nuxencs@users.noreply.github.com>
Co-authored-by: ze0s <ze0s@riseup.net>
2025-01-18 22:27:38 +01:00
Tebowy Seba
b2be5a703f
chore(indexers): remove PolishSource (#1943)
polishsource: tracker closed down

Site's gone forever.
2025-01-18 22:24:32 +01:00
soup
25574446f7
chore(license): update copyright year in headers (#1935) 2025-01-08 08:38:10 +01:00
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
338bcf38bb
feat(releases): improve collections/website/streaming service parsing (#1923)
* feat(releases): improve collections/website/streaming service parsing

* feat(releases): add more streaming services
2025-01-06 22:09:26 +01:00
ze0s
50820e6374
feat(indexers): MAM filter VIP with release tags (#1932)
feat(indexers): MAM parse VIP as releaseTags
2025-01-06 22:08:28 +01:00
ze0s
edd89f23e9
fix(filters): truncate rejections on debug level (#1933) 2025-01-06 18:49:21 +01:00
ze0s
f9a74d9b2e
fix(indexers): Fuzer parse full category (#1922) 2025-01-03 13:39:39 +01:00
ze0s
40c5462df9
fix(lists): improve parsing and exclude unwanted characters (#1918)
* fix(lists): improve parsing and ignore invalid titles

* chore: add missing license headers

* fix(lists): add missing tests from omegabrr
2025-01-03 12:45:58 +01:00
martylukyy
49534a4d32
feat(indexers): remove TSC (#1917) 2025-01-01 18:49:19 +01:00
ze0s
6b4f1d9f63
fix(database): migrations to update PTP IRC channel (#1906)
* fix(database): migrations to update PTP IRC channel

* refactor(web): remove channel disable logic from IRC forms

---------

Co-authored-by: s0up4200 <s0up4200@pm.me>
2024-12-28 14:45:45 +01:00
ze0s
af3907df9b
fix(releases): handle NULL hybrid field (#1905) 2024-12-27 17:06:51 +01:00
ze0s
7bb3487e5e
fix(lists): handle NULL clientID for non-arr lists on Postgres (#1904)
fix(lists): handle NULL clientID for Postgres
2024-12-27 16:06:05 +01:00
martylukyy
79f8a98e73
feat(indexers): implement AnimeWorld announce types (#1900) 2024-12-27 16:00:11 +01:00
ze0s
0cf704dba3
fix(releases): add null handling for new fields (#1892)
* fix(web): react fragment props warnings

* fix(releases): handle new NULL values
2024-12-26 01:04:39 +01:00
ze0s
9ae798c99a
feat(macros): add MetaIMDB (#1891)
feat(macros): add IMDB

* only supported by PTP at this time
2024-12-25 23:59:13 +01:00
ze0s
ea20fb4f50
feat(filters): set default Announce Type to NEW (#1890)
feat(filters): set default announce type NEW
2024-12-25 23:38:56 +01:00
ze0s
2c0672f4bc
fix(indexers): PTP update IRC channel (#1889)
* fix(indexers): PTP update IRC channel

* fix(database): add migrations for PTP IRC channel update

* fix(database): update PTP IRC channel references in invite commands

---------

Co-authored-by: s0up4200 <s0up4200@pm.me>
2024-12-25 22:51:01 +01:00
kenstir
4009554d10
feat(filters): skip duplicates (#1711)
* 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>
2024-12-25 22:33:46 +01:00
soup
d153ac44b8
feat(filters): RED and OPS fetch record label from API (#1881)
* feat(filters): RED and OPS fetch record label from API

* test: add record label to RED and OPS test data

* refactor: record label check

---------

Co-authored-by: ze0s <ze0s@riseup.net>
2024-12-25 13:39:03 +01:00
ze0s
221bc35371
feat(lists): integrate Omegabrr (#1885)
* 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
2024-12-25 13:23:37 +01:00
ze0s
b68ae334ca
fix(http): init oidc handler if enabled (#1888) 2024-12-22 21:59:58 +01:00
soup
43c28fc0c6
feat(auth): implement auth proxy support with OpenID Connect (#1853)
* 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>
2024-12-19 14:41:31 +01:00
KaiserBh
4432dfb099
feat(http): implement proper BaseUrl support to coexist with legacy mode (#1298)
* 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>
2024-12-19 12:56:04 +01:00
Alexander Chernov
acef4ac624
feat(filters): RED and OPS fetch uploader from API (#1348)
* feat: added uploader when fetching torrent details on RED indexer

* revert

* tests

* refactor(filters): size and uploader api checks

* refactor(filters): fix test

* refactor(filters): add mutex to rejections

---------

Co-authored-by: Kyle Sanderson <kyle.leet@gmail.com>
Co-authored-by: ze0s <ze0s@riseup.net>
2024-12-17 20:39:09 +01:00
ze0s
04c4bd482f
feat(releases): improve freeleech parsing (#1880)
* capture fl as freeleech from vars
2024-12-17 16:05:18 +01:00
ze0s
f6891bf9a3
fix(indexers): PrivateSilverScreen freeleech parsing (#1879) 2024-12-16 19:08:00 +01:00
ze0s
96f61a90e5
fix(database): SQLite try reindexing on integrity check error (#1877)
* fix(database): SQLite try reindexing on consistency error

* fix(database): SQLite return err if no bad indexes found
2024-12-14 15:58:18 +01:00
Kyle Sanderson
81ce8acb2b
fix(releases): search by group (#1876)
fix(search): regression on group
2024-12-12 13:56:04 +01:00
soup
21b768aed8
feat(indexers): add PrivateSilverScreen (#1871)
* feat(indexers): add PrivateSilverScreen

* fix: update irc auth pass not required
2024-12-12 13:52:00 +01:00
ze0s
e808edab50
fix(releases): set freeleech from downloadVolumeFactor (#1873)
* fix(releases): set freeleech from downloadVolumeFactor

* fix(releases): set freeleechpercent from downloadVolumeFactor
2024-12-11 16:44:09 +01:00
ze0s
24f31574e5
feat(indexers): update PTP announce to new format (#1738)
* feat(indexers): update PTP to new format

* fix: update expect line

* feat: use unique key for dl link

* feat: update pattern

* fix: definition tests

* feat: rename var

* feat: add custom vars map

* feat: start mapCustomVars

* Update internal/indexer/definitions/ptp.yaml

Co-authored-by: nuxen <felix.schubert1998@gmail.com>

* feat(indexers): map custom indexer vars

* feat: support upload unix epoch time

* feat(releases): update mapvars

* feat(indexers): remove ptp api init

* feat(indexers): update ptp category mapping

* feat(releases): show announce type in details

* feat(releases): mapvars announcetype

---------

Co-authored-by: nuxen <felix.schubert1998@gmail.com>
2024-12-08 23:35:32 +01:00
ze0s
f644b3a4d6
feat(filters): implement AnnounceType (#1837)
* feat(filters): implement AnnounceType

* fix: rss tests
2024-12-08 21:08:24 +01:00
Nuno Sénica
ab718b8232
feat(macros): add Description (#1863)
Add release.Description to macros
2024-12-07 17:44:53 +01:00
soup
99a9e6bc0f
fix(http): downgrade canOnboard check to warning log level (#1859) 2024-12-06 13:01:45 +01:00
establish33
4c39198c37
feat(indexers): add UploadCX (#1852)
* Create uploadcx.yaml

* fix: trim whitespace and remove percent sign

---------

Co-authored-by: ze0s <43699394+zze0s@users.noreply.github.com>
2024-11-30 19:15:10 +01:00
ze0s
ee04c61a54
fix(indexers): iPlay RMT update download url (#1849) 2024-11-27 17:14:24 +01:00
Kyle Sanderson
f292d2709b
fix(database): backup on windows bad filename (#1841)
* fix(migrations): use safe characters during backup

* remove _ because of splits

* Update sqlite.go

* flip
2024-11-25 10:59:40 +01:00
ze0s
2dcd876068
fix(database): SeedPool migrations (#1838) 2024-11-24 21:51:47 +01:00
ze0s
be9a956598
feat(indexers): update SeedPool IRC announce parsing (#1835)
* feat(indexers): update SeedPool IRC port

* feat(indexers): SeedPool add db migration

* fix(indexers): adapt regex, tests and vars

* fix(indexers): set internal var to origin to fix parsing

---------

Co-authored-by: martylukyy <35452459+martylukyy@users.noreply.github.com>
2024-11-24 18:34:40 +01:00
ze0s
b0a30dd136
feat(indexers): REDACTED update urls (#1830)
* feat(indexers): REDACTED update urls

* feat(databse): REDACTED update urls in db with migrations
2024-11-24 14:07:45 +01:00