fix copy tag in reduce-bitrate by id3lib app

This commit is contained in:
2026-05-14 21:14:01 +03:30
parent 3be3bed903
commit 4cfc8774ce
2 changed files with 3 additions and 52 deletions
+3 -6
View File
@@ -55,11 +55,8 @@ get_bitrate_kbps() {
restore_metadata() {
local source_file="$1"
local target_file="$2"
local script_dir="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
# Use Python script with mutagen to properly copy all ID3 tags including multi-value fields
"$script_dir/copy_id3_tags.py" "$source_file" "$target_file" 2>/dev/null
id3cp "$source_file" "$target_file" >/dev/null 2>&1
return $?
}
@@ -138,8 +135,8 @@ if ! command -v ffprobe >/dev/null 2>&1 || ! command -v ffmpeg >/dev/null 2>&1;
exit 1
fi
if ! python3 -c "import mutagen" 2>/dev/null; then
log_error "Python mutagen library not found. Please install python-mutagen (Arch) or python3-mutagen (Debian/Ubuntu)."
if ! command -v id3cp >/dev/null 2>&1; then
log_error "id3cp not found. Please install id3lib (Arch: id3lib, Debian/Ubuntu: libid3-tools)."
exit 1
fi