autobrr/internal/domain
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
..
testdata feat(releases): retry failed downloads (#491) 2022-10-19 21:52:31 +02:00
action.go feat(filters): skip duplicates (#1711) 2024-12-25 22:33:46 +01:00
api.go refactor(http): api key cache handling (#1632) 2024-08-28 16:51:03 +02:00
client.go feat(lists): integrate Omegabrr (#1885) 2024-12-25 13:23:37 +01:00
client_test.go fix(downloadclient): qBittorrent url parse err handling (#1832) 2024-11-24 00:53:59 +01:00
config.go feat(auth): implement auth proxy support with OpenID Connect (#1853) 2024-12-19 14:41:31 +01:00
error.go feat: add support for proxies to use with IRC and Indexers (#1421) 2024-09-02 11:10:45 +02:00
event.go fix(indexers): delete feed with indexer (#1810) 2024-11-06 20:48:46 +01:00
feed.go fix(indexers): delete feed with indexer (#1810) 2024-11-06 20:48:46 +01:00
filter.go feat(filters): skip duplicates (#1711) 2024-12-25 22:33:46 +01:00
filter_test.go feat(tests): add Parallelization where possible (#1823) 2024-11-23 15:16:09 +01:00
indexer.go feat(filters): RED and OPS fetch record label from API (#1881) 2024-12-25 13:39:03 +01:00
indexer_test.go feat(indexers): update PTP announce to new format (#1738) 2024-12-08 23:35:32 +01:00
irc.go refactor(wildcard): optimize and add caching (#1634) 2024-09-02 11:18:14 +02:00
list.go feat(lists): integrate Omegabrr (#1885) 2024-12-25 13:23:37 +01:00
macros.go feat(filters): skip duplicates (#1711) 2024-12-25 22:33:46 +01:00
macros_test.go feat(filters): skip duplicates (#1711) 2024-12-25 22:33:46 +01:00
notification.go fix(notifications): disable notification and events have no effect (#1754) 2024-10-06 14:12:01 +02:00
proxy.go feat: add support for proxies to use with IRC and Indexers (#1421) 2024-09-02 11:10:45 +02:00
rejections.go feat(filters): RED and OPS fetch uploader from API (#1348) 2024-12-17 20:39:09 +01:00
rejections_test.go feat(tests): add Parallelization where possible (#1823) 2024-11-23 15:16:09 +01:00
release.go feat(filters): skip duplicates (#1711) 2024-12-25 22:33:46 +01:00
release_download_test.go feat(filters): skip duplicates (#1711) 2024-12-25 22:33:46 +01:00
release_test.go feat(filters): skip duplicates (#1711) 2024-12-25 22:33:46 +01:00
releasetags.go feat(filters): skip duplicates (#1711) 2024-12-25 22:33:46 +01:00
releasetags_test.go feat(tests): add Parallelization where possible (#1823) 2024-11-23 15:16:09 +01:00
user.go chore: update license header year (#1332) 2024-01-01 16:21:02 +01:00