code refactor and add season pack size limit

This commit is contained in:
Simon Ding
2024-08-11 17:40:01 +08:00
parent 93e8e78591
commit f110f257d4
5 changed files with 115 additions and 46 deletions

View File

@@ -254,7 +254,11 @@ func (c *Client) downloadMovieSingleEpisode(ep *ent.Episode) error {
return errors.Wrap(err, "connect transmission")
}
res, err := SearchMovie(c.db, ep.MediaID, true, true)
res, err := SearchMovie(c.db, &SearchParam{
MediaId: ep.MediaID,
CheckFileSize: true,
CheckResolution: true,
})
if err != nil {
return errors.Wrap(err, "search movie")