mirror of
https://github.com/simon-ding/polaris.git
synced 2026-06-08 11:07:42 +08:00
code refactor & improve search page
This commit is contained in:
12
db/const.go
12
db/const.go
@@ -33,16 +33,4 @@ const (
|
||||
|
||||
type ResolutionType string
|
||||
|
||||
const (
|
||||
Any ResolutionType = "any"
|
||||
R720p ResolutionType = "720p"
|
||||
R1080p ResolutionType = "1080p"
|
||||
R4k ResolutionType = "4k"
|
||||
)
|
||||
|
||||
func (r ResolutionType) String() string {
|
||||
return string(r)
|
||||
}
|
||||
|
||||
|
||||
const JwtSerectKey = "jwt_secrect_key"
|
||||
1
db/db.go
1
db/db.go
@@ -146,6 +146,7 @@ func (c *Client) AddMediaWatchlist(m *ent.Media, episodes []int) (*ent.Media, er
|
||||
SetAirDate(m.AirDate).
|
||||
SetResolution(m.Resolution).
|
||||
SetTargetDir(m.TargetDir).
|
||||
SetDownloadHistoryEpisodes(m.DownloadHistoryEpisodes).
|
||||
AddEpisodeIDs(episodes...).
|
||||
Save(context.TODO())
|
||||
return r, err
|
||||
|
||||
Reference in New Issue
Block a user