about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorSoispha <soispha@vhack.eu>2024-01-01 18:21:13 +0100
committerSoispha <soispha@vhack.eu>2024-01-01 18:21:13 +0100
commit0d09df67ba4d84f881d20c87cae2e9b2e16807ee (patch)
tree0b211393c10b43a79a88fda8d14174f36ceea0d2
parentfix(hm/pkgs/ytc): Improve cli output (diff)
downloadnixos-config-0d09df67ba4d84f881d20c87cae2e9b2e16807ee.tar.gz
nixos-config-0d09df67ba4d84f881d20c87cae2e9b2e16807ee.zip
fix(hm/pkgs/ytc): Wait for last mpv instance to exit before starting burndown
Diffstat (limited to '')
-rwxr-xr-xhm/soispha/pkgs/scripts/wrappers/ytc2
1 files changed, 2 insertions, 0 deletions
diff --git a/hm/soispha/pkgs/scripts/wrappers/ytc b/hm/soispha/pkgs/scripts/wrappers/ytc
index 9dfbf6c5..f563f00d 100755
--- a/hm/soispha/pkgs/scripts/wrappers/ytc
+++ b/hm/soispha/pkgs/scripts/wrappers/ytc
@@ -75,6 +75,7 @@ while read -r base; do
 
     if [ "$old_filename" ]; then
         while [ "$(wc -l < "$files_to_play")" -gt "$CONCURRENT" ]; do
+            msg2 "Waiting for '$pid' to finish as we already have '$(wc -l < "$files_to_play")' files cached"
             wait "$pid"
         done
     fi
@@ -83,6 +84,7 @@ while read -r base; do
     old_id="$id";
 done < "$(tmp echo "$bases")"
 
+wait "$pid"
 echo "$old_filename,$old_id" >> "$files_to_play"
 
 while read -r base; do