From 6337ee72290afdd2c130d7846788775d9d277af0 Mon Sep 17 00:00:00 2001 From: Pawel Kolaczynski Date: Mon, 27 Jul 2020 09:49:07 +0200 Subject: [PATCH] It's fixed and the code from README should actually work --- convert.sh | 2 +- download.sh | 4 ++-- gen-script.py | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/convert.sh b/convert.sh index e81fe9d..38c5bea 100755 --- a/convert.sh +++ b/convert.sh @@ -9,5 +9,5 @@ for filename in ../subs/*; do ffmpeg -i $in $out done -rm ../subs.*vtt +rm ../subs/*vtt echo "convert.sh finished its job" \ No newline at end of file diff --git a/download.sh b/download.sh index 7afeb92..3c51c84 100755 --- a/download.sh +++ b/download.sh @@ -5,8 +5,8 @@ mkdir ../original #download subs cd ../subs -youtube-dl --write-auto-sub --yes-playlist --skip-download -o '%(playlist_index)s' $1 +youtube-dl --write-auto-sub --yes-playlist --skip-download -o '%(playlist_index)s.%(ext)s' $1 # download videos cd ../original -youtube-dl -f 22 --yes-playlist -o '%(playlist_index)s' $1 \ No newline at end of file +youtube-dl -f 22 --yes-playlist -o '%(playlist_index)s.%(ext)s' $1 \ No newline at end of file diff --git a/gen-script.py b/gen-script.py index 2791350..4ba174f 100755 --- a/gen-script.py +++ b/gen-script.py @@ -58,7 +58,7 @@ def write_list_rip(data, mode): file_rip.write('#!/bin/bash\n') for (i, d) in enumerate(data): if (d): - name = d['fname'][:2] # get a name without an extension + name = d['fname'].split('.')[0] # get a name without an extension outname ="../out/{}-{:0>2}.mp4".format(name, i) file_list.write("file '{}'\n".format(outname))