hlassiege/darylpublic Fork
⑂ 60f7193
Commits
⬇ Clone ▾
git clone https://git.rickub.com/hlassiege/daryl.git
git clone ssh://git@rickub.com/hlassiege/daryl.git

Host key fingerprint (ed25519): SHA256:iycHnxEyq0Q7uyVpB7JlznP0G7JrTPXLYRcAU5CSLhc — verify it before your first connect.

Download ZIP

fix(montage): restore motion_signature split by the media tag helpers

motion_signature was cut in two by the _MEDIA_TAG block, leaving
montage.py unparseable (IndentationError) and the backend unable to
start.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
hlassiege committed 2026-10-11T17:43:25+02:00 Browse files
60f7193 parent: 6c30fa0
modified backend/studio/modules/projects/montage.py +5 -5
@@ -42,8 +42,8 @@ qui passe avec son propre son. `gain_db` d'un clip de l'A-roll : son volume (abs
4242 pour un média de la bibliothèque commune (copié dans le projet à l'enregistrement).
4343 """
4444 import hashlib
45-import json
4645 import html
46+import json
4747 import os
4848 import re
4949 import shutil
@@ -64,9 +64,9 @@ TIMELINE_FILE = "timeline.json"
6464 INSERTIONS_FILE = "insertions.json"
6565 MOTION_DIR = "motion"
6666 RENDERS_DIR = "renders"
67-HISTORY_DIR = ".history"
6867 # les médias posés dans les compositions, copiés à côté d'elles (le rendu ne lit que montage/motion/)
6968 MEDIA_DIR = "media"
69+HISTORY_DIR = ".history"
7070 CACHE_DIR = ".cache"
7171 HISTORY_MAX = 60
7272 # les copies de travail de Daryl, une par demande en cours (daryl/<demande>/) ; dans chacune, WORK_BASE : la timeline
@@ -785,9 +785,6 @@ def after_change(pid: str) -> None:
785785
786786 # --- Motion design : rendu des compositions en .mov avec transparence ------------------------
787787
788-def motion_signature(pid: str, item: dict) -> str | None:
789- comp = motion_dir(pid) / f"{item['id']}.html"
790- if not comp.is_file():
791788 # un média posé dans une composition : <video src="media/m3-x.mp4" data-from="library/broll/x.mp4">
792789 _MEDIA_TAG = re.compile(r"<(?:video|img|audio|source)\b[^>]*>", re.I)
793790
@@ -830,6 +827,9 @@ def bring_media(pid: str, comp: str) -> list[str]:
830827 return missing
831828
832829
830+def motion_signature(pid: str, item: dict) -> str | None:
831+ comp = motion_dir(pid) / f"{item['id']}.html"
832+ if not comp.is_file():
833833 return None
834834 body = comp.read_bytes() + json.dumps([item["dur"]]).encode()
835835 style = motion_dir(pid) / "style.css"
@@ -42,8 +42,8 @@ qui passe avec son propre son. `gain_db` d'un clip de l'A-roll : son volume (abs
42 pour un média de la bibliothèque commune (copié dans le projet à l'enregistrement).42 pour un média de la bibliothèque commune (copié dans le projet à l'enregistrement).
43 """43 """
44 import hashlib44 import hashlib
45-import json
46 import html45 import html
46+import json
47 import os47 import os
48 import re48 import re
49 import shutil49 import shutil
@@ -64,9 +64,9 @@ TIMELINE_FILE = "timeline.json"
64 INSERTIONS_FILE = "insertions.json"64 INSERTIONS_FILE = "insertions.json"
65 MOTION_DIR = "motion"65 MOTION_DIR = "motion"
66 RENDERS_DIR = "renders"66 RENDERS_DIR = "renders"
67-HISTORY_DIR = ".history"
68 # les médias posés dans les compositions, copiés à côté d'elles (le rendu ne lit que montage/motion/)67 # les médias posés dans les compositions, copiés à côté d'elles (le rendu ne lit que montage/motion/)
69 MEDIA_DIR = "media"68 MEDIA_DIR = "media"
69+HISTORY_DIR = ".history"
70 CACHE_DIR = ".cache"70 CACHE_DIR = ".cache"
71 HISTORY_MAX = 6071 HISTORY_MAX = 60
72 # les copies de travail de Daryl, une par demande en cours (daryl/<demande>/) ; dans chacune, WORK_BASE : la timeline72 # les copies de travail de Daryl, une par demande en cours (daryl/<demande>/) ; dans chacune, WORK_BASE : la timeline
@@ -785,9 +785,6 @@ def after_change(pid: str) -> None:
785 785
786 # --- Motion design : rendu des compositions en .mov avec transparence ------------------------786 # --- Motion design : rendu des compositions en .mov avec transparence ------------------------
787 787
788-def motion_signature(pid: str, item: dict) -> str | None:
789- comp = motion_dir(pid) / f"{item['id']}.html"
790- if not comp.is_file():
791 # un média posé dans une composition : <video src="media/m3-x.mp4" data-from="library/broll/x.mp4">788 # un média posé dans une composition : <video src="media/m3-x.mp4" data-from="library/broll/x.mp4">
792 _MEDIA_TAG = re.compile(r"<(?:video|img|audio|source)\b[^>]*>", re.I)789 _MEDIA_TAG = re.compile(r"<(?:video|img|audio|source)\b[^>]*>", re.I)
793 790
@@ -830,6 +827,9 @@ def bring_media(pid: str, comp: str) -> list[str]:
830 return missing827 return missing
831 828
832 829
830+def motion_signature(pid: str, item: dict) -> str | None:
831+ comp = motion_dir(pid) / f"{item['id']}.html"
832+ if not comp.is_file():
833 return None833 return None
834 body = comp.read_bytes() + json.dumps([item["dur"]]).encode()834 body = comp.read_bytes() + json.dumps([item["dur"]]).encode()
835 style = motion_dir(pid) / "style.css"835 style = motion_dir(pid) / "style.css"