mirror of
https://github.com/simon-ding/polaris.git
synced 2026-03-06 17:40:46 +08:00
feat: save torrent link to history
This commit is contained in:
@@ -60,6 +60,7 @@ func (c *Client) DownloadEpisodeTorrent(r1 torznab.Result, seriesId, seasonNum,
|
||||
Status: history.StatusRunning,
|
||||
Size: r1.Size,
|
||||
Saved: torrent.Save(),
|
||||
Link: r1.Link,
|
||||
DownloadClientID: dlc.ID,
|
||||
IndexerID: r1.IndexerId,
|
||||
})
|
||||
@@ -126,6 +127,7 @@ func (c *Client) DownloadMovie(m *ent.Media, link, name string, size int, indexe
|
||||
Status: history.StatusRunning,
|
||||
Size: size,
|
||||
Saved: torrent.Save(),
|
||||
Link: link,
|
||||
DownloadClientID: dlc.ID,
|
||||
IndexerID: indexerID,
|
||||
})
|
||||
|
||||
@@ -377,6 +377,7 @@ func (c *Client) downloadMovieSingleEpisode(ep *ent.Episode, targetDir string) (
|
||||
Status: history.StatusRunning,
|
||||
Size: r1.Size,
|
||||
Saved: torrent.Save(),
|
||||
Link: r1.Link,
|
||||
DownloadClientID: dlc.ID,
|
||||
IndexerID: r1.IndexerId,
|
||||
})
|
||||
@@ -440,7 +441,7 @@ func (c *Client) checkSeiesNewSeason(media *ent.Media) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (c *Client) isSeedRatioLimitReached(indexId int, t pkg.Torrent)(float64,bool) {
|
||||
func (c *Client) isSeedRatioLimitReached(indexId int, t pkg.Torrent) (float64, bool) {
|
||||
indexer, err := c.db.GetIndexer(indexId)
|
||||
if err != nil {
|
||||
return 0, true
|
||||
|
||||
Reference in New Issue
Block a user