Skip to content

Commit 4a0ea94

Browse files
committed
wip38
1 parent d9959b9 commit 4a0ea94

1 file changed

Lines changed: 8 additions & 4 deletions

File tree

src/ffmpeg_downloader/__main__.py

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -251,12 +251,16 @@ def print_no_need():
251251

252252

253253
def uninstall(args):
254-
ver = ffdl.ffmpeg_version()
255-
if ver is None:
254+
# find existing version
255+
ver_info = ffdl.ffmpeg_version()
256+
if ver_info is None:
256257
print("\nNo FFmpeg build has been downloaded.")
257258
return
258259

259-
print(f"Found existing FFmpeg installation: {compose_version_spec(*ver)}")
260+
current_version, _, current_build_type = ver_info
261+
cur_ver_spec = compose_version_spec(current_version, current_build_type)
262+
263+
print(f"Found existing FFmpeg installation: {cur_ver_spec}")
260264
print(" Would remove:")
261265
print(f" {os.path.join(ffdl.get_dir(), 'ffmpeg', '*')}")
262266

@@ -270,7 +274,7 @@ def uninstall(args):
270274
# remove the ffmpeg directory
271275
ffdl.remove(ignore_errors=False)
272276

273-
print(f" Successfully uninstalled FFmpeg: {compose_version_spec(*ver)}")
277+
print(f" Successfully uninstalled FFmpeg: {cur_ver_spec}")
274278

275279

276280
def show(args):

0 commit comments

Comments
 (0)