From 178253d5475b1d37b99cdc91684a7ee9c4f935c8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20L=C3=B8vbr=C3=B8tte=20Olsen?= Date: Thu, 27 Sep 2018 14:19:20 +0000 Subject: [PATCH] Delete yt-m3u --- yt-m3u | 29 ----------------------------- 1 file changed, 29 deletions(-) delete mode 100755 yt-m3u diff --git a/yt-m3u b/yt-m3u deleted file mode 100755 index d6ce532..0000000 --- a/yt-m3u +++ /dev/null @@ -1,29 +0,0 @@ -#!/bin/bash -set -euo pipefail -IFS=$'\n\t' - -function get_duration { - preconvert=$(youtube-dl --get-duration -- "$1" | perl -p -i -e 's/(\d\d?):(\d\d)/$1 minutes+$2 seconds/' 2> /dev/null) - convert=$(units "$preconvert") - stripped=$(echo "$convert" | grep -o '[0-9]*') - echo "$stripped" -} - -function get_title { - result=$(youtube-dl --get-title -- "$1") - echo "$result" -} - -function makeline { - duration=$(get_duration "$1") - title=$(get_title "$1") - echo "#EXTINF:$duration:$title" -} - -videos=$(youtube-dl --get-id "$1") -videos=($videos) - -for i in "${videos[@]}"; do - makeline "$i" - echo "ffmpeg2wav:youtube-dl:$i" -done