History

use sed to parse genre. Fixes issue 19

Serge Zirukin committed 15 years ago

Commit f6aa25e1 parent 26390471 file · +2 −3Browse files

Unified · Split

split2flac.sh+2−3
@@ -68,7 +68,7 @@ unset PIC INPATH CUE CHARSET · 67 unmodified lines
68FORCE=068FORCE=0
69 69
70# do not forget to update before commit70# do not forget to update before commit
71VERSION=10271VERSION=103
72 72
73HELP="\${cG}split2flac version: ${VERSION}73HELP="\${cG}split2flac version: ${VERSION}
74Splits one big \${cU}APE/FLAC/WV/WAV\$cZ\$cG audio image (or a collection) into \${cU}FLAC/M4A/MP3/OGG_VORBIS/WAV\$cZ\$cG tracks with tagging and renaming.74Splits one big \${cU}APE/FLAC/WV/WAV\$cZ\$cG audio image (or a collection) into \${cU}FLAC/M4A/MP3/OGG_VORBIS/WAV\$cZ\$cG tracks with tagging and renaming.
@@ -422,8 +422,7 @@ split_file () { · 347 unmodified lines
422 return 1422 return 1
423 fi423 fi
424 424
425 TAG_GENRE=$(awk '{ if (/REM[ \t]+GENRE[ \t]+(.*)/) { print $0; exit } }' < "${CUE}")425 TAG_GENRE=$(sed 's/REM[ \t]*GENRE[ \t]*\(.*\)/\1/;s/"\(.*\)"/\1/;q' < "${CUE}")
426 TAG_GENRE=$(echo "${TAG_GENRE}" | sed 's/REM[ \t]\+GENRE[ \t]\+//;s/"\(.*\)"/\1/')
427 426
428 YEAR=$(awk '{ if (/REM[ \t]+DATE/) { printf "%i", $3; exit } }' < "${CUE}")427 YEAR=$(awk '{ if (/REM[ \t]+DATE/) { printf "%i", $3; exit } }' < "${CUE}")
429 YEAR=$(echo ${YEAR} | tr -d -c '[:digit:]')428 YEAR=$(echo ${YEAR} | tr -d -c '[:digit:]')

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