This commit is contained in:
Simon Ding
2024-11-15 17:58:24 +08:00
parent d2619120da
commit c4d153f15b
2 changed files with 4 additions and 4 deletions

View File

@@ -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))
}
}

View File

@@ -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 {