fix: upgrader use yt-dlp[default] as package name
This commit is contained in:
parent
dfcbd2d23d
commit
f7c74c0a63
1 changed files with 6 additions and 5 deletions
|
|
@ -113,15 +113,16 @@ class PackageInstaller:
|
||||||
if "yt_dlp" == pkg:
|
if "yt_dlp" == pkg:
|
||||||
pkg = "yt-dlp"
|
pkg = "yt-dlp"
|
||||||
|
|
||||||
|
pkg_name: str = "yt-dlp[default]" if pkg == "yt-dlp" else pkg
|
||||||
if version:
|
if version:
|
||||||
if "nightly" == version and pkg == "yt-dlp":
|
if "nightly" == version and "yt-dlp" == pkg:
|
||||||
cmd.extend(["--pre", "yt-dlp[default]"])
|
cmd.extend(["--pre", pkg_name])
|
||||||
elif "master" == version and pkg == "yt-dlp":
|
elif "master" == version and "yt-dlp" == pkg:
|
||||||
cmd.append("git+https://github.com/yt-dlp/yt-dlp.git@master")
|
cmd.append("git+https://github.com/yt-dlp/yt-dlp.git@master")
|
||||||
else:
|
else:
|
||||||
cmd.append(version if str(version).startswith("git+") else f"{pkg}=={version}")
|
cmd.append(version if str(version).startswith("git+") else f"{pkg_name}=={version}")
|
||||||
else:
|
else:
|
||||||
cmd.extend(["--disable-pip-version-check", pkg])
|
cmd.extend(["--disable-pip-version-check", pkg_name])
|
||||||
|
|
||||||
try:
|
try:
|
||||||
proc: subprocess.CompletedProcess[bytes] = subprocess.run(
|
proc: subprocess.CompletedProcess[bytes] = subprocess.run(
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue