Accumulate completion % in multi-track encodings

This commit is contained in:
Neale Pickett 2022-08-21 21:40:00 -06:00
parent 7d88a930e9
commit 8ffce5142c
2 changed files with 3 additions and 1 deletions

View File

@ -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__":

View File

@ -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