mirror of
https://github.com/idanoo/autobrr
synced 2025-07-23 08:49:13 +00:00
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>
This commit is contained in:
parent
cc9656cd41
commit
1a23b69bcf
64 changed files with 2543 additions and 2091 deletions
|
@ -174,86 +174,75 @@ const (
|
|||
)
|
||||
|
||||
type FilterUpdate struct {
|
||||
ID int `json:"id"`
|
||||
Name *string `json:"name,omitempty"`
|
||||
Enabled *bool `json:"enabled,omitempty"`
|
||||
MinSize *string `json:"min_size,omitempty"`
|
||||
MaxSize *string `json:"max_size,omitempty"`
|
||||
Delay *int `json:"delay,omitempty"`
|
||||
Priority *int32 `json:"priority,omitempty"`
|
||||
MaxDownloads *int `json:"max_downloads,omitempty"`
|
||||
MaxDownloadsUnit *FilterMaxDownloadsUnit `json:"max_downloads_unit,omitempty"`
|
||||
MatchReleases *string `json:"match_releases,omitempty"`
|
||||
ExceptReleases *string `json:"except_releases,omitempty"`
|
||||
UseRegex *bool `json:"use_regex,omitempty"`
|
||||
MatchReleaseGroups *string `json:"match_release_groups,omitempty"`
|
||||
ExceptReleaseGroups *string `json:"except_release_groups,omitempty"`
|
||||
MatchReleaseTags *string `json:"match_release_tags,omitempty"`
|
||||
ExceptReleaseTags *string `json:"except_release_tags,omitempty"`
|
||||
UseRegexReleaseTags *bool `json:"use_regex_release_tags,omitempty"`
|
||||
MatchDescription *string `json:"match_description,omitempty"`
|
||||
ExceptDescription *string `json:"except_description,omitempty"`
|
||||
UseRegexDescription *bool `json:"use_regex_description,omitempty"`
|
||||
Scene *bool `json:"scene,omitempty"`
|
||||
Origins *[]string `json:"origins,omitempty"`
|
||||
ExceptOrigins *[]string `json:"except_origins,omitempty"`
|
||||
Bonus *[]string `json:"bonus,omitempty"`
|
||||
Freeleech *bool `json:"freeleech,omitempty"`
|
||||
FreeleechPercent *string `json:"freeleech_percent,omitempty"`
|
||||
SmartEpisode *bool `json:"smart_episode,omitempty"`
|
||||
Shows *string `json:"shows,omitempty"`
|
||||
Seasons *string `json:"seasons,omitempty"`
|
||||
Episodes *string `json:"episodes,omitempty"`
|
||||
Resolutions *[]string `json:"resolutions,omitempty"` // SD, 480i, 480p, 576p, 720p, 810p, 1080i, 1080p.
|
||||
Codecs *[]string `json:"codecs,omitempty"` // XviD, DivX, x264, h.264 (or h264), mpeg2 (or mpeg-2), VC-1 (or VC1), WMV, Remux, h.264 Remux (or h264 Remux), VC-1 Remux (or VC1 Remux).
|
||||
Sources *[]string `json:"sources,omitempty"` // DSR, PDTV, HDTV, HR.PDTV, HR.HDTV, DVDRip, DVDScr, BDr, BD5, BD9, BDRip, BRRip, DVDR, MDVDR, HDDVD, HDDVDRip, BluRay, WEB-DL, TVRip, CAM, R5, TELESYNC, TS, TELECINE, TC. TELESYNC and TS are synonyms (you don't need both). Same for TELECINE and TC
|
||||
Containers *[]string `json:"containers,omitempty"`
|
||||
MatchHDR *[]string `json:"match_hdr,omitempty"`
|
||||
ExceptHDR *[]string `json:"except_hdr,omitempty"`
|
||||
MatchOther *[]string `json:"match_other,omitempty"`
|
||||
ExceptOther *[]string `json:"except_other,omitempty"`
|
||||
Years *string `json:"years,omitempty"`
|
||||
Artists *string `json:"artists,omitempty"`
|
||||
Albums *string `json:"albums,omitempty"`
|
||||
MatchReleaseTypes *[]string `json:"match_release_types,omitempty"` // Album,Single,EP
|
||||
ExceptReleaseTypes *string `json:"except_release_types,omitempty"`
|
||||
Formats *[]string `json:"formats,omitempty"` // MP3, FLAC, Ogg, AAC, AC3, DTS
|
||||
Quality *[]string `json:"quality,omitempty"` // 192, 320, APS (VBR), V2 (VBR), V1 (VBR), APX (VBR), V0 (VBR), q8.x (VBR), Lossless, 24bit Lossless, Other
|
||||
Media *[]string `json:"media,omitempty"` // CD, DVD, Vinyl, Soundboard, SACD, DAT, Cassette, WEB, Other
|
||||
PerfectFlac *bool `json:"perfect_flac,omitempty"`
|
||||
Cue *bool `json:"cue,omitempty"`
|
||||
Log *bool `json:"log,omitempty"`
|
||||
LogScore *int `json:"log_score,omitempty"`
|
||||
MatchCategories *string `json:"match_categories,omitempty"`
|
||||
ExceptCategories *string `json:"except_categories,omitempty"`
|
||||
MatchUploaders *string `json:"match_uploaders,omitempty"`
|
||||
ExceptUploaders *string `json:"except_uploaders,omitempty"`
|
||||
MatchLanguage *[]string `json:"match_language,omitempty"`
|
||||
ExceptLanguage *[]string `json:"except_language,omitempty"`
|
||||
Tags *string `json:"tags,omitempty"`
|
||||
ExceptTags *string `json:"except_tags,omitempty"`
|
||||
TagsAny *string `json:"tags_any,omitempty"`
|
||||
ExceptTagsAny *string `json:"except_tags_any,omitempty"`
|
||||
TagsMatchLogic *string `json:"tags_match_logic,omitempty"`
|
||||
ExceptTagsMatchLogic *string `json:"except_tags_match_logic,omitempty"`
|
||||
MinSeeders *int `json:"min_seeders,omitempty"`
|
||||
MaxSeeders *int `json:"max_seeders,omitempty"`
|
||||
MinLeechers *int `json:"min_leechers,omitempty"`
|
||||
MaxLeechers *int `json:"max_leechers,omitempty"`
|
||||
ExternalScriptEnabled *bool `json:"external_script_enabled,omitempty"`
|
||||
ExternalScriptCmd *string `json:"external_script_cmd,omitempty"`
|
||||
ExternalScriptArgs *string `json:"external_script_args,omitempty"`
|
||||
ExternalScriptExpectStatus *int `json:"external_script_expect_status,omitempty"`
|
||||
ExternalWebhookEnabled *bool `json:"external_webhook_enabled,omitempty"`
|
||||
ExternalWebhookHost *string `json:"external_webhook_host,omitempty"`
|
||||
ExternalWebhookData *string `json:"external_webhook_data,omitempty"`
|
||||
ExternalWebhookExpectStatus *int `json:"external_webhook_expect_status,omitempty"`
|
||||
ExternalWebhookRetryStatus *string `json:"external_webhook_retry_status,omitempty"`
|
||||
ExternalWebhookRetryAttempts *int `json:"external_webhook_retry_attempts,omitempty"`
|
||||
ExternalWebhookRetryDelaySeconds *int `json:"external_webhook_retry_delay_seconds,omitempty"`
|
||||
Actions []*Action `json:"actions,omitempty"`
|
||||
External []FilterExternal `json:"external,omitempty"`
|
||||
Indexers []Indexer `json:"indexers,omitempty"`
|
||||
ID int `json:"id"`
|
||||
Name *string `json:"name,omitempty"`
|
||||
Enabled *bool `json:"enabled,omitempty"`
|
||||
MinSize *string `json:"min_size,omitempty"`
|
||||
MaxSize *string `json:"max_size,omitempty"`
|
||||
Delay *int `json:"delay,omitempty"`
|
||||
Priority *int32 `json:"priority,omitempty"`
|
||||
MaxDownloads *int `json:"max_downloads,omitempty"`
|
||||
MaxDownloadsUnit *FilterMaxDownloadsUnit `json:"max_downloads_unit,omitempty"`
|
||||
MatchReleases *string `json:"match_releases,omitempty"`
|
||||
ExceptReleases *string `json:"except_releases,omitempty"`
|
||||
UseRegex *bool `json:"use_regex,omitempty"`
|
||||
MatchReleaseGroups *string `json:"match_release_groups,omitempty"`
|
||||
ExceptReleaseGroups *string `json:"except_release_groups,omitempty"`
|
||||
MatchReleaseTags *string `json:"match_release_tags,omitempty"`
|
||||
ExceptReleaseTags *string `json:"except_release_tags,omitempty"`
|
||||
UseRegexReleaseTags *bool `json:"use_regex_release_tags,omitempty"`
|
||||
MatchDescription *string `json:"match_description,omitempty"`
|
||||
ExceptDescription *string `json:"except_description,omitempty"`
|
||||
UseRegexDescription *bool `json:"use_regex_description,omitempty"`
|
||||
Scene *bool `json:"scene,omitempty"`
|
||||
Origins *[]string `json:"origins,omitempty"`
|
||||
ExceptOrigins *[]string `json:"except_origins,omitempty"`
|
||||
Bonus *[]string `json:"bonus,omitempty"`
|
||||
Freeleech *bool `json:"freeleech,omitempty"`
|
||||
FreeleechPercent *string `json:"freeleech_percent,omitempty"`
|
||||
SmartEpisode *bool `json:"smart_episode,omitempty"`
|
||||
Shows *string `json:"shows,omitempty"`
|
||||
Seasons *string `json:"seasons,omitempty"`
|
||||
Episodes *string `json:"episodes,omitempty"`
|
||||
Resolutions *[]string `json:"resolutions,omitempty"` // SD, 480i, 480p, 576p, 720p, 810p, 1080i, 1080p.
|
||||
Codecs *[]string `json:"codecs,omitempty"` // XviD, DivX, x264, h.264 (or h264), mpeg2 (or mpeg-2), VC-1 (or VC1), WMV, Remux, h.264 Remux (or h264 Remux), VC-1 Remux (or VC1 Remux).
|
||||
Sources *[]string `json:"sources,omitempty"` // DSR, PDTV, HDTV, HR.PDTV, HR.HDTV, DVDRip, DVDScr, BDr, BD5, BD9, BDRip, BRRip, DVDR, MDVDR, HDDVD, HDDVDRip, BluRay, WEB-DL, TVRip, CAM, R5, TELESYNC, TS, TELECINE, TC. TELESYNC and TS are synonyms (you don't need both). Same for TELECINE and TC
|
||||
Containers *[]string `json:"containers,omitempty"`
|
||||
MatchHDR *[]string `json:"match_hdr,omitempty"`
|
||||
ExceptHDR *[]string `json:"except_hdr,omitempty"`
|
||||
MatchOther *[]string `json:"match_other,omitempty"`
|
||||
ExceptOther *[]string `json:"except_other,omitempty"`
|
||||
Years *string `json:"years,omitempty"`
|
||||
Artists *string `json:"artists,omitempty"`
|
||||
Albums *string `json:"albums,omitempty"`
|
||||
MatchReleaseTypes *[]string `json:"match_release_types,omitempty"` // Album,Single,EP
|
||||
ExceptReleaseTypes *string `json:"except_release_types,omitempty"`
|
||||
Formats *[]string `json:"formats,omitempty"` // MP3, FLAC, Ogg, AAC, AC3, DTS
|
||||
Quality *[]string `json:"quality,omitempty"` // 192, 320, APS (VBR), V2 (VBR), V1 (VBR), APX (VBR), V0 (VBR), q8.x (VBR), Lossless, 24bit Lossless, Other
|
||||
Media *[]string `json:"media,omitempty"` // CD, DVD, Vinyl, Soundboard, SACD, DAT, Cassette, WEB, Other
|
||||
PerfectFlac *bool `json:"perfect_flac,omitempty"`
|
||||
Cue *bool `json:"cue,omitempty"`
|
||||
Log *bool `json:"log,omitempty"`
|
||||
LogScore *int `json:"log_score,omitempty"`
|
||||
MatchCategories *string `json:"match_categories,omitempty"`
|
||||
ExceptCategories *string `json:"except_categories,omitempty"`
|
||||
MatchUploaders *string `json:"match_uploaders,omitempty"`
|
||||
ExceptUploaders *string `json:"except_uploaders,omitempty"`
|
||||
MatchLanguage *[]string `json:"match_language,omitempty"`
|
||||
ExceptLanguage *[]string `json:"except_language,omitempty"`
|
||||
Tags *string `json:"tags,omitempty"`
|
||||
ExceptTags *string `json:"except_tags,omitempty"`
|
||||
TagsAny *string `json:"tags_any,omitempty"`
|
||||
ExceptTagsAny *string `json:"except_tags_any,omitempty"`
|
||||
TagsMatchLogic *string `json:"tags_match_logic,omitempty"`
|
||||
ExceptTagsMatchLogic *string `json:"except_tags_match_logic,omitempty"`
|
||||
MinSeeders *int `json:"min_seeders,omitempty"`
|
||||
MaxSeeders *int `json:"max_seeders,omitempty"`
|
||||
MinLeechers *int `json:"min_leechers,omitempty"`
|
||||
MaxLeechers *int `json:"max_leechers,omitempty"`
|
||||
Actions []*Action `json:"actions,omitempty"`
|
||||
External []FilterExternal `json:"external,omitempty"`
|
||||
Indexers []Indexer `json:"indexers,omitempty"`
|
||||
}
|
||||
|
||||
func (f *Filter) Validate() error {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue