Fix for invalid_download_code
This commit is contained in:
@@ -78,12 +78,12 @@ func (rd *RealDebrid) UnrestrictAndVerify(link string) (*Download, error) {
|
||||
rd.TokenManager.SetTokenAsExpired(token, "bandwidth limit exceeded")
|
||||
continue
|
||||
}
|
||||
if err != nil {
|
||||
return nil, err
|
||||
if err == nil {
|
||||
rd.verifiedLinks.Set(download.ID, time.Now().Unix()+60*60*24)
|
||||
return download, nil
|
||||
}
|
||||
rd.verifiedLinks.Set(download.ID, time.Now().Unix()+60*60*24)
|
||||
|
||||
return download, nil
|
||||
rd.verifiedLinks.Remove(download.ID)
|
||||
tokenMap.Remove(link)
|
||||
}
|
||||
|
||||
download, err := rd.UnrestrictLinkWithToken(link, token)
|
||||
|
||||
Reference in New Issue
Block a user