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:
1 parent
f0e1c2dfce
commit
315246cb39
2 files changed
+5
-2
No files matched your search
+1
-1
@@ -103,7 +103,7 @@ def etat(racine):
|
||||
cfg = reglages_voyage(v, site_cfg)
|
||||
a = sources.analyser(v, cfg)
|
||||
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)}"
|
||||
else:
|
||||
dossier = os.path.join(v, "videos")
|
||||
|
||||
+4
-1
@@ -95,8 +95,11 @@ def sorties(voyage, src):
|
||||
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)
|
||||
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)
|
||||
|
||||
|
||||
|
||||
Reference in new issue
Block a user