Fix issue on downloads
This commit is contained in:
@@ -104,19 +104,6 @@ func (dl *Downloader) DownloadLink(fileName, link string, resp http.ResponseWrit
|
||||
http.Error(resp, "File is not available", http.StatusInternalServerError)
|
||||
return
|
||||
} else {
|
||||
lFilename := strings.ToLower(fileName)
|
||||
unrestrictFilename := strings.ToLower(strings.TrimPrefix(unrestrict.Filename, "/"))
|
||||
if strings.Contains(lFilename, unrestrictFilename) {
|
||||
// this is possible if there's only 1 streamable file in the torrent
|
||||
// and then suddenly it's a rar file
|
||||
actualExt := filepath.Ext(unrestrictFilename)
|
||||
expectedExt := filepath.Ext(lFilename)
|
||||
if actualExt != expectedExt && unrestrict.Streamable != 1 {
|
||||
log.Warnf("File was changed and is not streamable: %s and %s (link=%s)", fileName, unrestrict.Filename, unrestrict.Link)
|
||||
} else {
|
||||
log.Warnf("Filename mismatch: %s and %s", fileName, unrestrict.Filename)
|
||||
}
|
||||
}
|
||||
if cfg.ShouldServeFromRclone() {
|
||||
if cfg.ShouldVerifyDownloadLink() {
|
||||
if !dl.client.CanFetchFirstByte(unrestrict.Download) {
|
||||
|
||||
Reference in New Issue
Block a user