From 5c14093d451d19b063c8064a9cc6da8676f9ad07 Mon Sep 17 00:00:00 2001 From: Out Of Ideas Date: Thu, 7 Mar 2024 12:02:30 -0600 Subject: [PATCH] Fix album art script --- album-art | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/album-art b/album-art index e33aedd..b9a3e17 100755 --- a/album-art +++ b/album-art @@ -1,6 +1,9 @@ -#!/bin/sh +!/bin/sh cover="cover.jpg" -for file in *; do - ffmpeg -y -i $file -i $cover -map 0:a -map 1 -codec copy -metadata:s:v title="Album cover" -metadata:s:v comment="Cover (front)" -disposition:v attached_pic $file +for file in *.flac; do + ffmpeg -i "$file" -i "$cover" -map 0:a -map 1 -codec copy -metadata:s:v title="Album cover" -metadata:s:v comment="Cover (front)" -disposition:v attached_pic "temp-$file" + + # Replace old file with new file + mv "temp-$file" "$file" done