mirror of
https://github.com/Ernous/TorrServerJellyfin.git
synced 2025-12-19 21:46:11 +05:00
fix AddExpiredTime function (#392)
This commit is contained in:
@@ -143,7 +143,10 @@ func (t *Torrent) GotInfo() bool {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (t *Torrent) AddExpiredTime(duration time.Duration) {
|
func (t *Torrent) AddExpiredTime(duration time.Duration) {
|
||||||
t.expiredTime = time.Now().Add(duration)
|
newExpiredTime := time.Now().Add(duration)
|
||||||
|
if t.expiredTime.Before(newExpiredTime) {
|
||||||
|
t.expiredTime = newExpiredTime
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
func (t *Torrent) watch() {
|
func (t *Torrent) watch() {
|
||||||
|
|||||||
Reference in New Issue
Block a user