From eb90304b176d929b0d416c486ba80d6d1ef7b076 Mon Sep 17 00:00:00 2001 From: Justin Moore Date: Thu, 12 Feb 2015 22:34:18 -0600 Subject: [PATCH] added checks for ffmpeg and avconv --- .gitignore | 1 + lib/logic.lib | 13 +++++++++++-- 2 files changed, 12 insertions(+), 2 deletions(-) create mode 100644 .gitignore diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..39b137a --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +Install diff --git a/lib/logic.lib b/lib/logic.lib index 5c03b7f..6241af9 100644 --- a/lib/logic.lib +++ b/lib/logic.lib @@ -1,9 +1,18 @@ #!/bin/bash -SET_GUI_BIN="zenity" -SET_CONV_TOOL="ffmpeg" +if [ ! -f /usr/bin/yad ];then + SET_GUI_BIN="zenity" +else + SET_GUI_BIN="yad" +fi + +if [ ! -f /usr/bin/ffmpeg ];then + SET_CONV_TOOL="avconv" +else + SET_CONV_TOOL="ffmpeg" +fi #convert youtube videos to mp3 with zenity progess bar backend() {