1
0
mirror of https://github.com/spaam/svtplay-dl.git synced 2024-11-24 04:05:39 +01:00

postprocess: support for finding ffmpeg in same directory

this will be helpful on windows if you dont have ffmpeg in
your PATH. it will look for ffmpeg in same directory
as svtplay-dl.exe.
This commit is contained in:
Johan Andersson 2021-09-22 20:43:53 +02:00
parent 1c9642c0bf
commit adcaa73210

View File

@ -1,7 +1,9 @@
import logging
import os
import pathlib
import platform
import re
import sys
from json import dumps
from random import sample
from shutil import which
@ -24,6 +26,10 @@ class postprocess:
self.detect = which(i)
if self.detect:
break
if self.detect is None and platform.system() == "Windows":
path = pathlib.Path(sys.executable).parent / "ffmpeg.exe"
if path.is_file:
self.detect = path
def merge(self):
if self.detect is None: