Skip to content

Commit 07e3969

Browse files
committed
Merge branch 'v3x-develop' of https://github.com/tonyofrancis/Fetch into v3x-develop
2 parents f1b9519 + 0477fce commit 07e3969

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

fetch2/src/main/java/com/tonyodev/fetch2/RequestInfo.kt

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,7 @@ open class RequestInfo : Serializable {
4343

4444
/**
4545
* Action used by Fetch when enqueuing a request and a previous request with the
46-
* same file is already being managed. Default EnqueueAction.REPLACE_EXISTING
47-
* which will replaces the existing request.
46+
* same file is already being managed. Default is [EnqueueAction.UPDATE_ACCORDINGLY].
4847
* */
4948
var enqueueAction = defaultEnqueueAction
5049

@@ -118,4 +117,4 @@ open class RequestInfo : Serializable {
118117
"autoRetryMaxAttempts=$autoRetryMaxAttempts, extras=$extras)"
119118
}
120119

121-
}
120+
}

fetch2/src/main/java/com/tonyodev/fetch2/downloader/ParallelFileDownloaderImpl.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -428,7 +428,7 @@ class ParallelFileDownloaderImpl(private val initialDownload: Download,
428428
downloadBlock.downloadedBytes = fileSlice.downloaded
429429
downloadBlock.startByte = fileSlice.startBytes
430430
downloadBlock.endByte = fileSlice.endBytes
431-
val downloadRequest = getRequestForDownload(download = downloadInfo, rangeStart = fileSlice.startBytes + fileSlice.downloaded, segment = fileSlice.position + 1)
431+
val downloadRequest = getRequestForDownload(download = downloadInfo, rangeStart = fileSlice.startBytes + fileSlice.downloaded, rangeEnd = fileSlice.endBytes, segment = fileSlice.position + 1)
432432
var downloadResponse: Downloader.Response? = null
433433
var saveRandomAccessFile: RandomAccessFile? = null
434434
try {

0 commit comments

Comments
 (0)