mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-02-03 01:35:22 +03:00
Get size of file from cache
This commit is contained in:
parent
132274579c
commit
1dbe02cbd0
@ -285,10 +285,12 @@ class RecordingMaintainer(threading.Thread):
|
|||||||
)
|
)
|
||||||
|
|
||||||
try:
|
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:
|
except OSError:
|
||||||
segment_size = 0
|
segment_size = 0
|
||||||
|
|
||||||
|
os.remove(cache_path)
|
||||||
|
|
||||||
rand_id = "".join(
|
rand_id = "".join(
|
||||||
random.choices(string.ascii_lowercase + string.digits, k=6)
|
random.choices(string.ascii_lowercase + string.digits, k=6)
|
||||||
)
|
)
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user