fix: plexmatch

This commit is contained in:
Simon Ding
2024-07-30 20:56:44 +08:00
parent 19ab8c65de
commit 2c3fd89f2a
3 changed files with 18 additions and 4 deletions

View File

@@ -167,6 +167,10 @@ func (c *Client) GetEpisode(seriesId, seasonNum, episodeNum int) (*ent.Episode,
return c.ent.Episode.Query().Where(episode.MediaID(seriesId), episode.SeasonNumber(seasonNum),
episode.EpisodeNumber(episodeNum)).First(context.TODO())
}
func (c *Client) GetEpisodeByID(epID int) (*ent.Episode, error) {
return c.ent.Episode.Query().Where(episode.ID(epID)).First(context.TODO())
}
func (c *Client) UpdateEpiode(episodeId int, name, overview string) error {
return c.ent.Episode.Update().Where(episode.ID(episodeId)).SetTitle(name).SetOverview(overview).Exec(context.TODO())