Version 11.9

This commit is contained in:
Kylmakalle
2024-07-02 19:58:37 +03:00
parent 587ac7bf00
commit 833ecbc777
797 changed files with 40411 additions and 2895 deletions

View File

@@ -1,3 +1,4 @@
import SGSimpleSettings
import Foundation
import Postbox
import SwiftSignalKit
@@ -384,9 +385,9 @@ private final class FetchImpl {
}
if isStory {
self.defaultPartSize = 512 * 1024
self.defaultPartSize = getSGDownloadPartSize(512 * 1024, fileSize: self.size)
} else {
self.defaultPartSize = 128 * 1024
self.defaultPartSize = getSGDownloadPartSize(128 * 1024, fileSize: self.size)
}
self.cdnPartSize = 128 * 1024
@@ -436,7 +437,7 @@ private final class FetchImpl {
maxPartSize: 1 * 1024 * 1024,
partAlignment: 4 * 1024,
partDivision: 1 * 1024 * 1024,
maxPendingParts: 6,
maxPendingParts: getSGMaxPendingParts(6),
decryptionState: decryptionState
))
}
@@ -692,7 +693,7 @@ private final class FetchImpl {
maxPartSize: self.cdnPartSize * 2,
partAlignment: self.cdnPartSize,
partDivision: 1 * 1024 * 1024,
maxPendingParts: 6,
maxPendingParts: getSGMaxPendingParts(6),
decryptionState: nil
))
self.update()
@@ -741,7 +742,7 @@ private final class FetchImpl {
maxPartSize: self.defaultPartSize,
partAlignment: 4 * 1024,
partDivision: 1 * 1024 * 1024,
maxPendingParts: 6,
maxPendingParts: getSGMaxPendingParts(6),
decryptionState: nil
))
@@ -927,7 +928,7 @@ private final class FetchImpl {
maxPartSize: self.cdnPartSize * 2,
partAlignment: self.cdnPartSize,
partDivision: 1 * 1024 * 1024,
maxPendingParts: 6,
maxPendingParts: getSGMaxPendingParts(6),
decryptionState: nil
))
case let .cdnRefresh(cdnData, refreshToken):