mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-22 22:25:57 +00:00
Video Player V2
This commit is contained in:
@@ -106,6 +106,16 @@ final class MediaBoxPartialFile {
|
||||
return (fd, Int(clippedRange.upperBound - clippedRange.lowerBound))
|
||||
}
|
||||
|
||||
static func internal_isPartialDataCached(manager: MediaBoxFileManager, path: String, metaPath: String, range: Range<Int64>) -> Bool {
|
||||
guard let fileMap = try? MediaBoxFileMap.read(manager: manager, path: metaPath) else {
|
||||
return false
|
||||
}
|
||||
guard let _ = fileMap.contains(range) else {
|
||||
return false
|
||||
}
|
||||
return true
|
||||
}
|
||||
|
||||
var storedSize: Int64 {
|
||||
assert(self.queue.isCurrent())
|
||||
return self.fileMap.sum
|
||||
|
||||
Reference in New Issue
Block a user