feat: use real link to download client

This commit is contained in:
Simon Ding
2025-04-19 21:22:06 +08:00
parent 1ea8246cfc
commit d44060ff33
3 changed files with 14 additions and 11 deletions

View File

@@ -172,10 +172,13 @@ func (c *Engine) downloadTorrent(m *ent.Media, r1 torznab.Result, seasonNum int,
}
}
hash, err := utils.Link2Hash(r1.Link)
link, hash, err := utils.GetRealLinkAndHash(r1.Link)
if err != nil {
return nil, errors.Wrap(err, "get hash")
}
r1.Link = link
history, err := c.db.SaveHistoryRecord(ent.History{
MediaID: m.ID,
EpisodeNums: episodeNums,