From 504a1f774a75a864b448595fd0e36667463d0a95 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kjist=C3=B3f?= Date: Sun, 15 Jan 2017 22:20:15 +0100 Subject: [PATCH] output files are now named correctly --- coub-dl.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/coub-dl.py b/coub-dl.py index 0298d03..426aca7 100644 --- a/coub-dl.py +++ b/coub-dl.py @@ -1,4 +1,4 @@ -from subprocess import call, Popen, PIPE +from subprocess import call, Popen, PIPE, check_output from os import listdir, remove from os.path import splitext from re import match @@ -67,6 +67,8 @@ with open(FILES[File.LIST], 'w') as f: print("file '{}'".format(shorterFile), file=f) +FILES[File.OUTPUT] = check_output(('/usr/bin/env', 'youtube-dl', '--get-title', argv[1])).decode('utf-8').strip() + '.mp4' + call(('/usr/bin/env', 'ffmpeg', '-f', 'concat', '-i', FILES[File.LIST], '-c', 'copy', FILES[File.LOOP])) call(('/usr/bin/env', 'ffmpeg', '-i', FILES[File.LOOP], '-i', FILES[Stream.AUDIO],