From 597bd06b63da092b5ea00fdd2fdb6602df1d76d0 Mon Sep 17 00:00:00 2001 From: morgado99 <54038185+jmorgadov@users.noreply.github.com> Date: Sat, 12 Sep 2020 13:30:34 -0400 Subject: [PATCH 1/4] - --- CONTRIBUTING.md | 1 + video_diet/main.py | 8 +++++++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 0ad7d0a..c437512 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -4,6 +4,7 @@ * Leynier Gutiérrez González ([@leynier](https://github.com/leynier)) * Hian Cañizares Díaz ([@hiancdtrsnm](https://github.com/hiancdtrsnm)) +* Jorge Morgado Vega ([@jmorgadov](https://github.com/jmorgadov)) You can help out by: diff --git a/video_diet/main.py b/video_diet/main.py index c3082c7..a0b3522 100644 --- a/video_diet/main.py +++ b/video_diet/main.py @@ -94,4 +94,10 @@ def file(path: Path = typer.Argument( typer.secho('The destination file already exist, please delete it', fg=RED) return - convert_video(str(path),str(conv_path)) + try: + convert_video(str(path),str(conv_path)) + + except FileNotFoundError as error: + if error.filename == 'ffmpeg': + typer.secho('It seems you don\'t have ffmpeg installed', fg=RED) + else: raise From eba4f3bb522c84551f61f8178d3298c8d78e3902 Mon Sep 17 00:00:00 2001 From: morgado99 <54038185+jmorgadov@users.noreply.github.com> Date: Sat, 12 Sep 2020 13:49:27 -0400 Subject: [PATCH 2/4] - --- video_diet/main.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/video_diet/main.py b/video_diet/main.py index a0b3522..07e5baf 100644 --- a/video_diet/main.py +++ b/video_diet/main.py @@ -96,8 +96,9 @@ def file(path: Path = typer.Argument( try: convert_video(str(path),str(conv_path)) - + except FileNotFoundError as error: if error.filename == 'ffmpeg': typer.secho('It seems you don\'t have ffmpeg installed', fg=RED) + typer.secho('Check FFMPEG secction on https://github.com/hiancdtrsnm/video-diet/blob/master/README.md', fg=RED) else: raise From b26656dddc1d45764fd00f2166ca7f4211da53d7 Mon Sep 17 00:00:00 2001 From: morgado99 <54038185+jmorgadov@users.noreply.github.com> Date: Sat, 12 Sep 2020 20:02:37 -0400 Subject: [PATCH 3/4] - --- video_diet/main.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/video_diet/main.py b/video_diet/main.py index 07e5baf..2467166 100644 --- a/video_diet/main.py +++ b/video_diet/main.py @@ -101,4 +101,5 @@ def file(path: Path = typer.Argument( if error.filename == 'ffmpeg': typer.secho('It seems you don\'t have ffmpeg installed', fg=RED) typer.secho('Check FFMPEG secction on https://github.com/hiancdtrsnm/video-diet/blob/master/README.md', fg=RED) - else: raise + else: + raise error From 4c971a3e36a1e9838532c51ddd2c0aa8cd6e99a2 Mon Sep 17 00:00:00 2001 From: morgado99 <54038185+jmorgadov@users.noreply.github.com> Date: Sat, 12 Sep 2020 20:12:36 -0400 Subject: [PATCH 4/4] - --- video_diet/main.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/video_diet/main.py b/video_diet/main.py index 029e369..9d0c1f0 100644 --- a/video_diet/main.py +++ b/video_diet/main.py @@ -115,6 +115,6 @@ def file(path: Path = typer.Argument( except FileNotFoundError as error: if error.filename == 'ffmpeg': typer.secho('It seems you don\'t have ffmpeg installed', fg=RED) - typer.secho('Check FFMPEG secction on https://github.com/hiancdtrsnm/video-diet/blob/master/README.md', fg=RED) + typer.secho('Check FFMPEG secction on https://github.com/hiancdtrsnm/video-diet#FFMPEG', fg=RED) else: raise error