Commit graph

400 commits

Author SHA1 Message Date
ze0s
83e9232b98
fix(auth): invalid session error (#892)
* chore: ignore dist dir

* fix(auth): speculative invalid session
2023-05-01 14:27:30 +02:00
Yuchen Ying
82a117c12b
fix(notifications): always verify Telegram certificate (#893) 2023-05-01 03:00:33 +02:00
ze0s
64900c4d56
fix(downloadclients): remove from filter actions on delete (#891)
fix(downloadclients): properly delete from filter actions
2023-05-01 01:18:46 +02:00
ze0s
82beb31767
feat(indexers): iAnon parse category and freeleech (#886)
* feat(indexers): iAnon parse category and freeleech

* feat(indexers): iAnon parse category and freeleech
2023-04-30 00:21:44 +02:00
ze0s
ef3445cbed
fix(releases): max downloads per hour (#883)
* 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>
2023-04-29 21:52:49 +02:00
Nelson Pecora
da5492febb
feat(notifications): add Pushover (#598)
* 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>
2023-04-29 17:07:15 +02:00
Kyle Sanderson
1b8f2fce3c
fix(release): cleanup temporary torrent files (#839)
* fix(release): cleanup temporary files

* the other file

* backout revert
2023-04-27 21:43:20 +02:00
martylukyy
b0198bc2a3
fix(indexers): OPS new announce format (#862)
* fix ops parsing
extend regex capture group for torrentName var to contain releaseTags var
replace all – in announces with a - for torrentName var

* update ops yaml for new announces

* replace en-dashes with hyphens for OPS
add Sampler to releaseTypeMusic const
sort strings of releaseTypeMusic const alphabetically
shorten import in constants.ts

* replace en-dashes in pattern with . to cover any separator

---------

Co-authored-by: ze0s <43699394+zze0s@users.noreply.github.com>
2023-04-26 20:31:21 +02:00
martylukyy
9e2e43477d
fix(indexers): TorrentNetwork settings crash (#879)
fix panic due to misspelling in definition
2023-04-24 12:59:50 +02:00
ze0s
956bccd69f
feat(releases): set freeleech percent 100 with freeleech bool (#872)
* feat(releases): set freeleech to freeleech percent 100

* fix(releases): check if freeleechpercent is gt 0
2023-04-23 20:54:39 +02:00
Joakim Olsen
35af06a535
feat(macros): add Category and Categories (#863)
Adding "Category", "Categories" filter variables

Add "Category" and "Categories" to available filter variables, ie available as {{ .Category }}.
2023-04-23 15:53:43 +02:00
ze0s
7f05dd1efd
fix(onboarding): could not create user (#848)
fix: onboarding not working
2023-04-17 20:56:17 +02:00
KaiserBh
e0aaa0bcab
fix(notifications): test handle unsupported type (#841)
* bugfix: nil pointer dereference

if agent variable is nil when the Send method is called, will crash.

* refactor: return early.

* refactor: idiomatic solution.

---------

Co-authored-by: KaiserBh <kaiserbh@proton.me>
2023-04-16 18:44:07 +02:00
ze0s
f3cfeed8cd
feat(indexers): test API from settings (#829)
* 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
2023-04-15 23:34:27 +02:00
ze0s
fb9dcc23a0
feat(indexers): add iAnon (#838)
* feat(indexers): add iAnon

* fix: regex captures
2023-04-15 17:50:10 +02:00
ze0s
969a9e7025
fix(indexers): PolishSource downloads (#837)
* test: dump req and res for torrent download

* chore: remove req res dump
2023-04-14 21:15:32 +02:00
paperclip-go-brr
8487475e73
feat(indexers): add Tokyo Toshokan (#818)
* Add toktotoshokan.yaml definition

* Update tokyotoshokan.yaml
2023-04-13 18:09:24 +02:00
soup
81092cfe16
fix(indexers): OPS parsing (#832)
* fix/OPS parsing

* replaced special character with .
escaped / in case we ever switch regex flavour
altered a test line to account for empty releaseTags

---------

Co-authored-by: martylukyy <35452459+martylukyy@users.noreply.github.com>
2023-04-13 18:05:35 +02:00
Gustavo Machado
ef75b67b25
feat(filters): add match logic for tags and except tags (#810)
* 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>
2023-04-10 16:11:44 +02:00
soup
2534186b5f
feat(macros): add TorrentID and GroupID (#819)
* add TorrentID to list of supported macros

* added GroupID
2023-04-10 15:04:52 +02:00
martylukyy
169863dded
feat(logs): webhook sanitization (#809)
* feat: sanitize passwords from json payload

* add webhook sanitization

* update comments

Co-authored-by: soup <soup@r4tio.dev>

* sanitize RED apikeys from webhook payloads

* added an optional whitespace token between field name and data

---------

Co-authored-by: soup <soup@r4tio.dev>
2023-04-10 14:32:19 +02:00
KaiserBh
1cdbbe5bf3
refactor(web): migrate create-react-app to vite (#823)
* fix(build): dockerignore add exclusions

* fix: baseurl and build

* chore: removed react-app-env instead use vite

* chore: updated server and embedding static files.

* commented because conflict I believe, and not needed.

* docs: updated readme

* chore: updated json and added vite

* chore: import fix

* chore: updated yarn.lock and package json

* build: add empty dist to compile backend

* fix: use / as default baseurl

---------

Co-authored-by: KaiserBh <kaiserbh@proton.me>
Co-authored-by: ze0s <ze0s@riseup.net>
2023-04-10 14:28:24 +02:00
ze0s
33897b04a1
Revert #787 (#821)
Revert "refactor(web): migrate create-react-app to vite (#787)"

This reverts commit edae1bbf4b.
2023-04-07 19:08:42 +02:00
KaiserBh
edae1bbf4b
refactor(web): migrate create-react-app to vite (#787)
* removed react-app type instead use vite.

* removed index.html from public since vite uses it from root: read more: https://vitejs.dev/guide/#index-html-and-project-root

* yarn.lock update.

* added vite config file. With commented rollUp option if we want the build to be called build but using default stuff for now.

* updated tsconfig to use vite and include vite.config.ts

* changed package json build commands to use vite.

* for some reason there is an error in vite config when we put project as tsconfig.json.

* build.go updated to use the new dist folder.

* refactored as well updated to use dist and web.AssetHandler again.

* Fixed issue forcing the frontend to be reloaded for all routes to work if logged in fresh without reloading it will always go back to dashboard.

* updated it to use the new function; need to fix the Index for baseUrl I believe, if enabled it works except logs route will crash due to cors.

* refactored and default port to 7474, don't think we need the rollUpOptions.

* added tmp/ to ignore .

* init air.toml, for dev hot reloading both app and backend. https://github.com/cosmtrek/air run it using air but make sure it's in PATH

* updated the start command to build and watch for changes, works great with air.

* revert

* added proxy for vite config. To be used for dev.

* refactor: I think this should fix it, when logs route etc getting accessed usually it throws error but by getting rid of the catch-all it should work as intended, since web.RegisterHandler(r) will catch the unmatched ones.

* fix: baseurl and build

* fix(build): docker ignore !web/dist

* fix(build): dockerignore add exclusions

* docs: update README.md

* build: update postcss config

---------

Co-authored-by: KaiserBh <kaiserbh@proton.me>
Co-authored-by: ze0s <ze0s@riseup.net>
2023-04-07 16:04:10 +02:00
martylukyy
4cf251e2cf
feat(indexers): add TheDarkCommunity (#808)
* add TheDarkCommunity indexer

* add RSS as supported protocol
2023-04-02 22:36:42 +02:00
costaht
86725d804e
feat(indexers): add Locadora (#796)
* Adds Locadora

That file adds a new indexer to autobrr

* Update locadora.yml

* rename to locadora.yaml in order for autobrr to recognize the definition

* Adding NickServ authentication

---------

Co-authored-by: martylukyy <35452459+martylukyy@users.noreply.github.com>
2023-03-30 22:07:08 +02:00
soup
37261c9432
refactor(logs): use zerolog instead of log (#797)
fix(logs): use zerolog instead of log
2023-03-30 22:04:44 +02:00
soup
c2fcd91da7
refactor(logs): improve log sanitization performance (#779)
* refactor log sanitization for better performance

* Fix token error, add mutex for safer concurrency

* serve sanitized version directly from memory

* further improvements

made it check for "module":"irc" before running the irc regex checks

* Revert "further improvements"

This reverts commit 260037c3a58e1e760613167d3e15136b313c0612.

* update irc regexes to handle special characters

- added prefixes to the irc patterns
- improved tests

* more improvements for irc regexes

* fixed errors

* another edge case bites the dust

* regex improvements

* lock to 1 worker if cpu cores is 2 or less

* removed unused code

* revert to single thread

Moved regex patterns and replacements into a separate array for easier maintenance and readability.

Optimized the regex patterns that share the same replacement string to avoid redundancy.

Modify SanitizeLogFile to accept io.Writer for direct output

* style

* only check relevant lines

- only check relevant lines
- dont break unless length=0

* revert breaking change

* handle api and auth cases

---------

Co-authored-by: Kyle Sanderson <kyle.leet@gmail.com>
2023-03-26 23:25:23 +02:00
metonym
5fed0921c5
feat(actions): add "don't start" option for rtorrent (#782) 2023-03-26 23:17:44 +02:00
KaiserBh
07b3569cde
enhancement(config): clarify logPath usage (#783)
Added clarity for logPath as people on windows uses backslashes which doesn't work.

Co-authored-by: KaiserBh <kaiserbh@proton.me>
2023-03-26 23:14:07 +02:00
Kyle Sanderson
b6062ffc60
fix(feeds): check settings before unmarshalling (#789) 2023-03-26 23:10:59 +02:00
martylukyy
fe2950f630
fix(indexers): pbay announce bot name (#790)
* fix pbay announce bot name

* add both announce bot names in case of reversal
2023-03-26 23:09:59 +02:00
Kyle Sanderson
0564f0bf7a
fix(actions): watch folder (#780)
* fix(macros): Download torrent for watchfolders

* use in-memory torrent for watchfolder

* Update run.go
2023-03-22 21:57:18 +01:00
ze0s
81d494ec5c
fix(feeds): torznab newznab category parsing (#775) 2023-03-19 23:35:33 +01:00
Kyle Sanderson
0d6e23f278
chore(http): set log level to trace (#765) 2023-03-19 22:01:43 +01:00
soup
4ade1b0ecf
feat(logs): sanitize logfile on download (#767)
* initial commit

* handle tleech urls

* improved and simplified regex

* add sanitization status & loading anim for log dl

* removed unused imports

* improved regex

* fixed regex and added tests

* regex improvements and tests

* added unicode matching to saslRegex

* added missing baseurl

* swapped the css animator for a react component

the css version froze when served through a reverse proxy

* optimized regex compilation

---------

Co-authored-by: soup <soup@r4tio.cat>
2023-03-19 21:57:16 +01:00
Kyle Sanderson
5836fcee63
fix(feeds): implement max_age for torznab/newznab (#763)
* fix(nab): Implement max_age for torznab/newznab

* continue newznab

* continue torznab
2023-03-19 21:26:18 +01:00
metonym
9fed6b3735
feat(actions): rtorrent add folder rename toggle (#756)
* feat(actions): rtorrent add folder rename toggle

* refactor: use content layout
2023-03-19 21:25:53 +01:00
Kyle Sanderson
603828be9d
feat(sqlite): commit WAL on startup (#684)
* fix(sqlite): increase page_size to 65536

* fix(db): implement WAL commit on startup

* revert page_size
2023-03-19 21:21:02 +01:00
Kyle Sanderson
ef61331a22
chore(indexers): properly capitalize Aither network (#768) 2023-03-19 21:08:49 +01:00
bakerboy448
830e719169
fix(newznab): Use valid usenet release protocol for Starrs (#762)
also update comments

Fixes #761
2023-03-19 20:58:47 +01:00
Kyle Sanderson
29bedc532d
fix(macros): torrentdata parsing (#757)
* fix(macros): Fix torrentdata parsing in macros.

* fix action test

* more dead code

* hunting demons

* limit success output
2023-03-19 20:53:42 +01:00
nuxen
371943d144
fix(tags): 24bit Lossless being tagged as Lossless (#743)
* 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
2023-03-07 19:50:38 +01:00
ze0s
59a1bd900e
fix(indexers): add generic newznab definition (#741)
fix(indexers): add Newznab definition
2023-03-05 19:59:55 +01:00
ze0s
bd2769f3f2
fix(filters): match dv hdr (#736)
fix(filters): match hdr (dv hdr)
2023-03-05 15:35:41 +01:00
soup
2daab695eb
fix(indexers): ncore irc server change (#738) 2023-03-05 15:27:51 +01:00
Kyle Sanderson
13a74f7cc8
feat: add usenet support (#543)
* feat(autobrr): implement usenet support

* feat(sonarr): implement usenet support

* feat(radarr): implement usenet support

* feat(announce): implement usenet support

* announce: cast a line

* feat(release): prevent unknown protocol transfer

* release: lines for days.

* feat: add newznab and sabnzbd support

* feat: add category to sabnzbd

* feat(newznab): map categories

* feat(newznab): map categories

---------

Co-authored-by: ze0s <43699394+zze0s@users.noreply.github.com>
Co-authored-by: ze0s <ze0s@riseup.net>
2023-03-04 20:27:18 +01:00
ze0s
ca196f0bf1
feat(releases): support magnet links (#730)
* feat(releases): support magnet links

* feat(feeds): support magnet links

* feat(actions): log messages

* fix: component warning

* fix: check hasprefix instead of hassuffix for magnet

* feat(release): resolve magnet uri from link

* fix(actions): deluge use magnet uri

* fix(macros): add `MagnetURI` var

* fix(actions): run magnet resolving before macros

* feat(feeds): set download type on creation
2023-02-28 22:16:10 +01:00
soup
c6101cc765
feat(indexers): add PTFiles (PTF) (#729)
* feat(indexer): add PTFiles

thanks qmayer for providing it

* encode torrentName
2023-02-26 19:05:14 +01:00
vekvoid
e29cd9d80a
feat(macros): add sprig functions to macros (#733) 2023-02-26 19:02:41 +01:00