mirror of
https://github.com/idanoo/autobrr
synced 2025-07-23 08:49:13 +00:00
feat(filters): support daily shows (#1462)
* feat(database): Add month, day columns to release table * feat(database): Add month, day columns to postgres release table * feat(filters): support daily show format * feat(filters): check smart episode daily * fix(tests): rss * feat(filters): add daily shows elements to form * enhancement(web): minimize html in MoviesAndTV tab * feat(filters): smart episode check proper and repack * feat(filters): smart episode do not allow multiple latest * feat(filters): smart episode check group with repack * feat(filters): smart episode allow multiple current releases --------- Co-authored-by: s0up4200 <soup@r4tio.dev> Co-authored-by: ze0s <43699394+zze0s@users.noreply.github.com> Co-authored-by: martylukyy <35452459+martylukyy@users.noreply.github.com>
This commit is contained in:
parent
2a3dcfbf05
commit
4fceccd611
15 changed files with 270 additions and 56 deletions
|
@ -12,6 +12,7 @@ import (
|
|||
"net/http"
|
||||
"net/http/cookiejar"
|
||||
"os"
|
||||
"slices"
|
||||
"strconv"
|
||||
"strings"
|
||||
"time"
|
||||
|
@ -35,7 +36,7 @@ type ReleaseRepo interface {
|
|||
GetIndexerOptions(ctx context.Context) ([]string, error)
|
||||
Stats(ctx context.Context) (*ReleaseStats, error)
|
||||
Delete(ctx context.Context, req *DeleteReleaseRequest) error
|
||||
CanDownloadShow(ctx context.Context, title string, season int, episode int) (bool, error)
|
||||
CheckSmartEpisodeCanDownload(ctx context.Context, p *SmartEpisodeParams) (bool, error)
|
||||
UpdateBaseURL(ctx context.Context, indexer string, oldBaseURL, newBaseURL string) error
|
||||
|
||||
GetActionStatus(ctx context.Context, req *GetReleaseActionStatusRequest) (*ReleaseActionStatus, error)
|
||||
|
@ -68,6 +69,8 @@ type Release struct {
|
|||
Season int `json:"season"`
|
||||
Episode int `json:"episode"`
|
||||
Year int `json:"year"`
|
||||
Month int `json:"month"`
|
||||
Day int `json:"day"`
|
||||
Resolution string `json:"resolution"`
|
||||
Source string `json:"source"`
|
||||
Codec []string `json:"codec"`
|
||||
|
@ -316,10 +319,14 @@ func (r *Release) ParseString(title string) {
|
|||
r.Codec = rel.Codec
|
||||
r.Container = rel.Container
|
||||
r.HDR = rel.HDR
|
||||
r.Other = rel.Other
|
||||
r.Artists = rel.Artist
|
||||
r.Language = rel.Language
|
||||
|
||||
r.Other = rel.Other
|
||||
|
||||
r.Proper = slices.Contains(r.Other, "PROPER")
|
||||
r.Repack = slices.Contains(r.Other, "REPACK")
|
||||
|
||||
if r.Title == "" {
|
||||
r.Title = rel.Title
|
||||
}
|
||||
|
@ -334,6 +341,12 @@ func (r *Release) ParseString(title string) {
|
|||
if r.Year == 0 {
|
||||
r.Year = rel.Year
|
||||
}
|
||||
if r.Month == 0 {
|
||||
r.Month = rel.Month
|
||||
}
|
||||
if r.Day == 0 {
|
||||
r.Day = rel.Day
|
||||
}
|
||||
|
||||
if r.Group == "" {
|
||||
r.Group = rel.Group
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue