[WIP] Stories

This commit is contained in:
Ali
2023-05-12 19:29:22 +04:00
parent e8dab90584
commit 8e28d85626
18 changed files with 1216 additions and 184 deletions

View File

@@ -161,6 +161,9 @@ private final class FetchManagerCategoryContext {
previousPriorityKey = nil
let (mediaReference, resourceReference, statsCategory, episode) = takeNew()
entry = FetchManagerLocationEntry(id: id, episode: episode, mediaReference: mediaReference, resourceReference: resourceReference, statsCategory: statsCategory)
Logger.shared.log("FetchManager", "[\(entry.id.location)] Adding entry \(entry.resourceReference.resource.id.stringRepresentation) (\(self.entries.count) in queue)")
self.entries[id] = entry
} else {
return
@@ -236,7 +239,7 @@ private final class FetchManagerCategoryContext {
}
activeContext.disposable?.dispose()
let postbox = self.postbox
Logger.shared.log("FetchManager", "Begin fetching \(entry.resourceReference.resource.id.stringRepresentation) ranges: \(String(describing: parsedRanges))")
Logger.shared.log("FetchManager", "[\(entry.id.location)] Begin fetching \(entry.resourceReference.resource.id.stringRepresentation) ranges: \(String(describing: parsedRanges))")
var userLocation: MediaResourceUserLocation = .other
switch entry.id.location {
@@ -401,7 +404,7 @@ private final class FetchManagerCategoryContext {
} else if ranges.isEmpty {
} else {
let postbox = self.postbox
Logger.shared.log("FetchManager", "Begin fetching \(entry.resourceReference.resource.id.stringRepresentation) ranges: \(String(describing: parsedRanges))")
Logger.shared.log("FetchManager", "[\(entry.id.location)] Begin fetching \(entry.resourceReference.resource.id.stringRepresentation) ranges: \(String(describing: parsedRanges))")
var userLocation: MediaResourceUserLocation = .other
switch entry.id.location {