From 04cc72d15462414122b9415987f067c8a57ccef9 Mon Sep 17 00:00:00 2001 From: derrod Date: Tue, 21 Apr 2020 20:25:26 +0200 Subject: [PATCH] [downloader] Make read speed actually work (somewhat) --- legendary/downloader/manager.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/legendary/downloader/manager.py b/legendary/downloader/manager.py index 1eb5a1a..a8e5f9f 100644 --- a/legendary/downloader/manager.py +++ b/legendary/downloader/manager.py @@ -228,7 +228,11 @@ class DLManager(Process): if res.chunk_guid: self.bytes_written_since_last += res.size + # if there's no shared memory we must have read from disk. + if not res.shm: + self.bytes_read_since_last += res.size self.num_processed_since_last += 1 + except Empty: continue except Exception as e: