Get size of file from cache

This commit is contained in:
Nick Mowen 2022-09-26 16:31:57 -06:00
parent 132274579c
commit 1dbe02cbd0

View File

@ -285,10 +285,12 @@ class RecordingMaintainer(threading.Thread):
)
try:
segment_size = round(float(os.path.getsize(file_path)) / 1000000, 1)
segment_size = round(float(os.path.getsize(cache_path)) / 1000000, 1)
except OSError:
segment_size = 0
os.remove(cache_path)
rand_id = "".join(
random.choices(string.ascii_lowercase + string.digits, k=6)
)