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
|
complete = (finished_length + progress*length) / total_length
|
||||||
self.status["complete"] = complete
|
self.status["complete"] = complete
|
||||||
|
|
||||||
|
finished_length += length
|
||||||
os.rename(
|
os.rename(
|
||||||
src=tmppath,
|
src=tmppath,
|
||||||
dst=outpath,
|
dst=outpath,
|
||||||
)
|
)
|
||||||
|
logging.info("Finished track %d; length %d" % (track, length))
|
||||||
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
|
|
|
@ -47,7 +47,7 @@ class Reader(threading.Thread):
|
||||||
self.drive = None # Close existing
|
self.drive = None # Close existing
|
||||||
try:
|
try:
|
||||||
self.drive = os.open(self.device, os.O_RDONLY | os.O_NONBLOCK)
|
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:
|
except FileNotFoundError:
|
||||||
pass
|
pass
|
||||||
self.staleness = 0
|
self.staleness = 0
|
||||||
|
|
Loading…
Reference in New Issue