mirror of
https://github.com/simon-ding/polaris.git
synced 2026-06-09 03:27:39 +08:00
feat: check file already downloaded
This commit is contained in:
2
db/db.go
2
db/db.go
@@ -470,7 +470,7 @@ func (c *Client) UpdateEpisodeFile(mediaID int, seasonNum, episodeNum int, file
|
||||
if err != nil {
|
||||
return errors.Wrap(err, "finding episode")
|
||||
}
|
||||
return ep.Update().SetFileInStorage(file).Exec(context.TODO())
|
||||
return ep.Update().SetFileInStorage(file).SetStatus(episode.StatusDownloaded).Exec(context.TODO())
|
||||
}
|
||||
|
||||
func (c *Client) SetEpisodeStatus(id int, status episode.Status) error {
|
||||
|
||||
Reference in New Issue
Block a user