This commit is contained in:
ed 2026-05-26 18:45:13 +00:00
parent ce33a88e25
commit cc80ecc341
2 changed files with 7 additions and 6 deletions

View file

@ -1,6 +1,6 @@
# coding: utf-8 # coding: utf-8
VERSION = (1, 20, 15) VERSION = (1, 20, 16)
CODENAME = "sftp is fine too" CODENAME = "sftp is fine too"
BUILD_DT = (2026, 5, 26) BUILD_DT = (2026, 5, 26)

View file

@ -53,22 +53,23 @@ def have_ff(name: str) -> bytes:
ebin = os.environ.get("PRTY_%s_BIN" % (uname,)) ebin = os.environ.get("PRTY_%s_BIN" % (uname,))
try: try:
bcmd = (ebin or name).encode("utf-8") scmd = (ebin or name).decode("utf-8")
except: except:
bcmd: bytes = ebin or name scmd: str = ebin or name
if ANYWIN and not ebin: if ANYWIN and not ebin:
bcmd += b".exe" scmd += ".exe"
if PY2: if PY2:
print("# checking {}".format(bcmd)) print("# checking %s" % (scmd,))
bcmd = scmd.encode("utf-8")
try: try:
sp.Popen([bcmd, b"-version"], stdout=sp.PIPE, stderr=sp.PIPE).communicate() sp.Popen([bcmd, b"-version"], stdout=sp.PIPE, stderr=sp.PIPE).communicate()
return bcmd return bcmd
except: except:
return b"" return b""
else: else:
return shutil.which(bcmd) or b"" return (shutil.which(scmd) or "").encode("utf-8")
HAVE_FFMPEG = have_ff("ffmpeg") HAVE_FFMPEG = have_ff("ffmpeg")