From 8c2188ec0764610687fd685404ac00fa5b893aa1 Mon Sep 17 00:00:00 2001 From: lassulus Date: Sun, 30 Sep 2018 14:23:30 +0200 Subject: utils.download_ogg: actually check for existance of .ogg file --- shell.nix | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/shell.nix b/shell.nix index f231666..02c1e15 100644 --- a/shell.nix +++ b/shell.nix @@ -149,8 +149,7 @@ let echo "already in finished: $1" fi id="$(echo "$1" | ${pkgs.gnused}/bin/sed 's@.*youtube.com/watch?v=\([^#]*\)#.*@\1@')" - echo $id - if ls "$target_folder" | ${pkgs.gnugrep}/bin/grep -Fe "$(echo "$1" | ${pkgs.gnused}/bin/sed 's@.*youtube.com/watch?v=\([^#]*\)#.*@\1@')"; then + if ls "$target_folder" | ${pkgs.gnugrep}/bin/grep -Fe "$id.ogg"; then echo "file already exists: $1" else ${pkgs.youtube-dl}/bin/youtube-dl \ -- cgit v1.2.3