diff --git a/db/db.go b/db/db.go index edd1eec..09ca7c0 100644 --- a/db/db.go +++ b/db/db.go @@ -483,7 +483,8 @@ func (c *Client) SaveHistoryRecord(h ent.History) (*ent.History, error) { } return c.ent.History.Create().SetMediaID(h.MediaID).SetEpisodeID(h.EpisodeID).SetDate(time.Now()). SetStatus(h.Status).SetTargetDir(h.TargetDir).SetSourceTitle(h.SourceTitle).SetIndexerID(h.IndexerID). - SetDownloadClientID(h.DownloadClientID).SetSize(h.Size).SetSaved(h.Saved).SetLink(h.Link).Save(context.TODO()) + SetDownloadClientID(h.DownloadClientID).SetSize(h.Size).SetSaved(h.Saved).SetSeasonNum(h.SeasonNum). + SetEpisodeNums(h.EpisodeNums).SetLink(h.Link).Save(context.TODO()) } func (c *Client) SetHistoryStatus(id int, status history.Status) error { @@ -661,7 +662,6 @@ func (c *Client) AddBlacklistItem(item *ent.Blacklist) error { return c.ent.Blacklist.Create().SetType(item.Type).SetValue(item.Value).SetNotes(item.Notes).Exec(context.Background()) } - func (c *Client) GetProwlarrSetting() (*ProwlarrSetting, error) { s := c.GetSetting(SettingProwlarrInfo) if s == "" { @@ -680,4 +680,4 @@ func (c *Client) SaveProwlarrSetting(se *ProwlarrSetting) error { return err } return c.SetSetting(SettingProwlarrInfo, string(data)) -} \ No newline at end of file +} diff --git a/server/core/resources.go b/server/core/resources.go index bbe381a..51ab7c2 100644 --- a/server/core/resources.go +++ b/server/core/resources.go @@ -115,7 +115,7 @@ func (c *Client) checkBtReourceWithTmdb(r *torznab.Result, seriesId int) bool { m := metadata.ParseTv(r.Name) se, err := c.MustTMDB().SearchMedia(m.NameEn, "", 1) if err != nil { - log.Warnf("tmdb search error, consider this torrent ok: ", err) + log.Warnf("tmdb search error, consider this torrent ok: %v", err) return true } else { if len(se.Results) == 0 {