summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorlassulus <lassulus@lassul.us>2018-09-30 14:23:30 +0200
committerlassulus <lassulus@lassul.us>2018-09-30 14:23:30 +0200
commit8c2188ec0764610687fd685404ac00fa5b893aa1 (patch)
treeefa3b456db92b8becba659d725320d14b9bcee65
parent503eefbb889c22cede0aa7bd9088ec93e2dd1502 (diff)
utils.download_ogg: actually check for existance of .ogg file
-rw-r--r--shell.nix3
1 files changed, 1 insertions, 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 \