mirror of
https://github.com/pewdiepie-archdaemon/odysseus.git
synced 2026-08-09 10:39:11 +02:00
improve cache size calculation by filtering file types
This commit is contained in:
parent
d183fe545b
commit
2e631ad816
1 changed files with 2 additions and 2 deletions
|
|
@ -107,9 +107,9 @@ class TTSService:
|
|||
total_size = 0
|
||||
|
||||
# Safely scan files and sum sizes, ignoring files deleted mid-scan
|
||||
for f in self.cache_dir.glob("*.*"):
|
||||
for f in self.cache_dir.iterdir():
|
||||
try:
|
||||
if f.is_file():
|
||||
if f.is_file() and f.suffix.lower() in (".mp3", ".wav"):
|
||||
files.append(f)
|
||||
total_size += f.stat().st_size
|
||||
except OSError:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue