Open lissyx opened 2 years ago
diff --git a/generate_side_by_side.py b/generate_side_by_side.py
index 038376f..5a0c258 100644
--- a/generate_side_by_side.py
+++ b/generate_side_by_side.py
@@ -226,11 +226,19 @@ def find_videos(artifact_dir, original=False):
with warm_path.open() as f:
warm_data = json.load(f)
+ def read_path(p, f):
+ rv = None
+ if "\\" in f:
+ rv = pathlib.PureWindowsPath(p.parents[0], f).as_posix()
+ else:
+ rv = pathlib.Path(p.parents[0], f)
+ return rv
+
return {
"cold": [
- str(pathlib.Path(cold_path.parents[0], file)).replace(".mp4", "-original.mp4")
+ str(read_path(cold_path, file)).replace(".mp4", "-original.mp4")
if original
- else str(pathlib.Path(cold_path.parents[0], file))
+ else str(read_path(cold_path, file))
for file in cold_data[0]["files"]["video"]
],
"warm": [
The path itself is good, but it's Windows-formatted: