From f57671f31747a3eabddd2e8bd1a1e729ba09b478 Mon Sep 17 00:00:00 2001 From: Liam Date: Thu, 4 Apr 2019 19:36:36 +0100 Subject: [PATCH] buggggggz File gets stuck sometimes --- furaffinity-dl-ng | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/furaffinity-dl-ng b/furaffinity-dl-ng index 64f2b9c..5e77ed2 100755 --- a/furaffinity-dl-ng +++ b/furaffinity-dl-ng @@ -135,12 +135,7 @@ https://github.com/Xerbo/furaffinity-dl-ng/issues" >&2 wget "$image_url" -O "$file" # Add metadata - if [[ $(file $file) =~ (MPEG|audio) ]]; then - # Use exiftool for injecting metadata into pictures (if it's installed) - if [ $exiftool ] && [ $metadata ]; then - exiftool "$file" -description="$description" -title="$title" - fi - else + if [ $file_type == "mp3" ] || [ $file_type == "wav" ] || [ $file_type == "wmv" ] || [ $file_type == "ogg" ] || [ $file_type == "flac" ]; then # Use eyeD3 for injecting injecting metadata into audio files (if it's installed) if [ $eyed3 ] && [ $metadata ]; then if [ -z "$description" ]; then @@ -150,6 +145,11 @@ https://github.com/Xerbo/furaffinity-dl-ng/issues" >&2 eyeD3 -t "$title" --add-comment "${description//:/\\:}" "$file" fi fi + else + # Use exiftool for injecting metadata into pictures (if it's installed) + if [ $exiftool ] && [ $metadata ]; then + exiftool "$file" -description="$description" -title="$title" + fi fi done