added share function

This commit is contained in:
2026-08-26 09:47:52 +08:00
parent ccd8ec16bb
commit f80da8a5f6
5 changed files with 435 additions and 18 deletions

View File

@@ -68,10 +68,14 @@ class Settings:
def attempts_dir(self) -> Path:
return self.data_dir / "attempts"
@property
def dub_shares_dir(self) -> Path:
return self.data_dir / "dub_shares"
@property
def database_path(self) -> Path:
return self.data_dir / "oral_trainer.sqlite3"
def ensure_directories(self) -> None:
for path in (self.data_dir, self.videos_dir, self.work_dir, self.attempts_dir):
for path in (self.data_dir, self.videos_dir, self.work_dir, self.attempts_dir, self.dub_shares_dir):
path.mkdir(parents=True, exist_ok=True)