From 8ffce5142c81bbaa14944d916b218a711960452f Mon Sep 17 00:00:00 2001 From: Neale Pickett Date: Sun, 21 Aug 2022 21:40:00 -0600 Subject: [PATCH] Accumulate completion % in multi-track encodings --- src/dvd.py | 2 ++ src/reader.py | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/dvd.py b/src/dvd.py index c2c1064..4f6cbd3 100644 --- a/src/dvd.py +++ b/src/dvd.py @@ -162,10 +162,12 @@ class Encoder: complete = (finished_length + progress*length) / total_length self.status["complete"] = complete + finished_length += length os.rename( src=tmppath, dst=outpath, ) + logging.info("Finished track %d; length %d" % (track, length)) if __name__ == "__main__": diff --git a/src/reader.py b/src/reader.py index 8cd411d..3a1dbff 100644 --- a/src/reader.py +++ b/src/reader.py @@ -47,7 +47,7 @@ class Reader(threading.Thread): self.drive = None # Close existing try: self.drive = os.open(self.device, os.O_RDONLY | os.O_NONBLOCK) - logging.info("Reopened %s" % self.device) + logging.debug("Reopened %s" % self.device) except FileNotFoundError: pass self.staleness = 0