History

support track-specific performer for albums with various artists

Serge Zirukin committed 16 years ago

Commit 085a2ef1 parent 89282c71 file · +12 −5Browse files

Unified · Split

split2flac.sh+12−5
@@ -465,7 +465,14 @@ split_file () { · 464 unmodified lines
465465 FILE_TITLE=$(echo ${TAG_TITLE} | ${VALIDATE})
466466 f="${OUT}/${FILE_TRACK}.${FORMAT}"
467467
468− $msg "$i: $cG${TAG_TITLE}$cZ\n"
468+ TAG_PERFORMER=$(cueprint -n $i -t %p "${CUE}" 2>/dev/null)
469+
470+ if [ "${TAG_PERFORMER}" -a "${TAG_PERFORMER}" != "${TAG_ARTIST}" ]; then
471+ $msg "$i: $cG${TAG_PERFORMER} - ${TAG_TITLE}$cZ\n"
472+ else
473+ TAG_PERFORMER="${TAG_ARTIST}"
474+ $msg "$i: $cG${TAG_TITLE}$cZ\n"
475+ fi
469476
470477 FINAL=$(update_pattern "${OUT}/${PATTERN}" "title" "${FILE_TITLE}")
471478 FINAL=$(update_pattern "${FINAL}" "track" "${FILE_TRACK}")
@@ -482,7 +489,7 @@ split_file () { · 10 unmodified lines
482489 case ${FORMAT} in
483490 flac)
484491 ${METAFLAC} --remove-all-tags \
485− --set-tag="ARTIST=${TAG_ARTIST}" \
492+ --set-tag="ARTIST=${TAG_PERFORMER}" \
486493 --set-tag="ALBUM=${TAG_ALBUM}" \
487494 --set-tag="TITLE=${TAG_TITLE}" \
488495 --set-tag="TRACKNUMBER=$i" \
@@ -495,7 +502,7 @@ split_file () { · 6 unmodified lines
495502 ;;
496503
497504 mp3)
498− ${ID3TAG} "-a${TAG_ARTIST}" \
505+ ${ID3TAG} "-a${TAG_PERFORMER}" \
499506 "-A${TAG_ALBUM}" \
500507 "-s${TAG_TITLE}" \
501508 "-t$i" \
@@ -509,7 +516,7 @@ split_file () { · 7 unmodified lines
509516
510517 ogg)
511518 ${VORBISCOMMENT} "${FINAL}" \
512− -t "ARTIST=${TAG_ARTIST}" \
519+ -t "ARTIST=${TAG_PERFORMER}" \
513520 -t "ALBUM=${TAG_ALBUM}" \
514521 -t "TITLE=${TAG_TITLE}" \
515522 -t "TRACKNUMBER=$i" >/dev/null
@@ -521,7 +528,7 @@ split_file () { · 5 unmodified lines
521528
522529 m4a)
523530 ${MP4TAGS} "${FINAL}" \
524− -a "${TAG_ARTIST}" \
531+ -a "${TAG_PERFORMER}" \
525532 -A "${TAG_ALBUM}" \
526533 -s "${TAG_TITLE}" \
527534 -t "$i" \

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t