Accumulate completion % in multi-track encodings
This commit is contained in:
parent
7d88a930e9
commit
8ffce5142c
|
@ -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__":
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue