rtg etat : vérification rapide des vidéos (existence) au lieu de ffprobe

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Mf2kATMtqVABHSYdxJMnim
This commit is contained in:
FabriceandClaude Opus 5.5 committed 2026-10-09 11:48:01 +00:00
1 parent f0e1c2dfce
commit 315246cb39
2 files changed
+5 -2

No files matched your search

+1 -1
View File
@@ -103,7 +103,7 @@ def etat(racine):
cfg = reglages_voyage(v, site_cfg) cfg = reglages_voyage(v, site_cfg)
a = sources.analyser(v, cfg) a = sources.analyser(v, cfg)
if a.videos: if a.videos:
faites = sum(1 for s in a.videos if video.deja_faite(v, s)) faites = sum(1 for s in a.videos if video.deja_faite(v, s, rapide=True))
vid = f"{faites}/{len(a.videos)}" vid = f"{faites}/{len(a.videos)}"
else: else:
dossier = os.path.join(v, "videos") dossier = os.path.join(v, "videos")
+4 -1
View File
@@ -95,8 +95,11 @@ def sorties(voyage, src):
return os.path.join(dossier, base + ".mp4"), os.path.join(dossier, base + "_mobile.mp4") return os.path.join(dossier, base + ".mp4"), os.path.join(dossier, base + "_mobile.mp4")
def deja_faite(voyage, src): def deja_faite(voyage, src, rapide=False):
"""Les deux sorties existent (rapide=True) ou sont lisibles par ffprobe."""
hd, sd = sorties(voyage, src) hd, sd = sorties(voyage, src)
if rapide:
return all(os.path.exists(f) and os.path.getsize(f) > 0 for f in (hd, sd))
return lisible(hd) and lisible(sd) return lisible(hd) and lisible(sd)