25 lines
736 B
Python
25 lines
736 B
Python
from __future__ import annotations
|
|
|
|
import argparse
|
|
|
|
from app.animations.store import AnimationStore
|
|
from app.config.store import ConfigStore
|
|
from app.media.manager import MediaImportManager
|
|
from app.templates.store import TemplateStore
|
|
|
|
|
|
def main() -> int:
|
|
parser = argparse.ArgumentParser(description="Run one isolated media import action")
|
|
parser.add_argument("job_id")
|
|
args = parser.parse_args()
|
|
config = ConfigStore()
|
|
templates = TemplateStore(config.data_dir)
|
|
animations = AnimationStore(config.data_dir, cleanup_playback=False)
|
|
manager = MediaImportManager(config.data_dir, templates, animations)
|
|
manager.run_job(args.job_id)
|
|
return 0
|
|
|
|
|
|
if __name__ == "__main__":
|
|
raise SystemExit(main())
|