feat: change single episode monitoring status

This commit is contained in:
Simon Ding
2024-08-03 10:46:52 +08:00
parent 578b6a9d78
commit 16216fcc4f
8 changed files with 81 additions and 23 deletions

View File

@@ -552,3 +552,8 @@ func (c *Client) GetMovieDummyEpisode(movieId int) (*ent.Episode, error) {
func (c *Client) GetDownloadClient(id int) (*ent.DownloadClients, error) {
return c.ent.DownloadClients.Query().Where(downloadclients.ID(id)).First(context.Background())
}
func (c *Client) SetEpisodeMonitoring(id int, b bool) error {
return c.ent.Episode.Update().Where(episode.ID(id)).SetMonitored(b).Exec(context.Background())
}