markComplete static method
Mark download as complete.
Implementation
static Future<void> markComplete(String url, int totalBytes) async {
await _ensureLoaded();
final existing = _cache[url];
_cache[url] = CacheMetadata(
downloadedBytes: totalBytes,
totalBytes: totalBytes,
isComplete: true,
lastUpdated: DateTime.now(),
isHls: existing?.isHls ?? false,
);
await _persist();
}