mirror of
https://github.com/9001/copyparty.git
synced 2026-06-18 20:22:27 -06:00
v1.20.16
This commit is contained in:
parent
ce33a88e25
commit
cc80ecc341
|
|
@ -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)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -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")
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue