Commit 272e295b742b923230dd14a4f24938209af28d37
1 parent
1ef3d1bf
scheint jetzt wirklich gut zu funktionieren...zumindest mit flac. Hab nahezu all…
…e meine CDs damit encoded. Was anderes als flac hab ich noch nicht getestet.
Showing
2 changed files
with
15 additions
and
15 deletions
... | ... | @@ -412,7 +412,7 @@ do |
412 | 412 | case ${encodingType} in |
413 | 413 | f) |
414 | 414 | outFile="`printf %02d ${trackNr}`-${tTitle[$i]}.flac" |
415 | - outStr="track-$trackNr => ${outFile}: " | |
415 | + outStr="track-$trackNr => ${outFile/\//-}: " | |
416 | 416 | |
417 | 417 | ( |
418 | 418 | exec 2>&1 |
... | ... | @@ -422,14 +422,14 @@ do |
422 | 422 | -T genre="${dGenre}" -T title="${tTitle[$i]}" \ |
423 | 423 | -T tracknumber="${trackNr}" -T tracknum="${trackNr}" \ |
424 | 424 | -T date="${dYear}" -T comment="" \ |
425 | - -o "${encodingDir}/${outFile}" - #2>/dev/null | |
425 | + -o "${encodingDir}/${outFile/\//-}" - #2>/dev/null | |
426 | 426 | ) | tr '\r' '\n' |\ |
427 | - sed '/^ [0-9]/!d;s/^.* \([0-9]*%\).*$/\r'"${outStr}"'\1/' |\ | |
427 | + sed '/^ [0-9]/!d;/^ *[0-9]*\./d;s/^.* \([0-9]*%\).*$/\r'"${outStr}"'\1/' |\ | |
428 | 428 | tr -d '\n' >$outStream |
429 | 429 | ;; |
430 | 430 | m) |
431 | 431 | outFile="`printf %02d ${trackNr}`-${tTitle[$i]}.mp3" |
432 | - outStr="track-$trackNr => ${outFile}: " | |
432 | + outStr="track-$trackNr => ${outFile/\//-}: " | |
433 | 433 | |
434 | 434 | case ${encoder} in |
435 | 435 | lame) |
... | ... | @@ -441,9 +441,9 @@ do |
441 | 441 | --tg "${dGenre}" --tt "${tTitle[$i]}" \ |
442 | 442 | --tn "${trackNr}" --ty "${dYear}" \ |
443 | 443 | --tc "" \ |
444 | - - "${encodingDir}/${outFile}" 2>/dev/null | |
444 | + - "${encodingDir}/${outFile/\//-}" 2>/dev/null | |
445 | 445 | ) | tr '\r' '\n' |\ |
446 | - sed '/^ [0-9]/!d;s/^.* \([0-9]*%\).*$/\r'"${outStr}"'\1/' |\ | |
446 | + sed '/^ [0-9]/!d;/^ *[0-9]*\./d;s/^.* \([0-9]*%\).*$/\r'"${outStr}"'\1/' |\ | |
447 | 447 | tr -d '\n' >$outStream |
448 | 448 | ;; |
449 | 449 | bladeenc) |
... | ... | @@ -451,16 +451,16 @@ do |
451 | 451 | exec 2>&1 |
452 | 452 | cdda2wav -H -D/dev/cdrom -I${cddaIf} -t${trackNr} - |\ |
453 | 453 | bladeenc -progress=0 STDIN \ |
454 | - "${encodingDir}/${outFile}" 2>/dev/null | |
454 | + "${encodingDir}/${outFile/\//-}" 2>/dev/null | |
455 | 455 | ) | tr '\r' '\n' |\ |
456 | - sed '/^ [0-9]/!d;s/^.* \([0-9]*%\).*$/\r'"${outStr}"'\1/' |\ | |
456 | + sed '/^ [0-9]/!d;/^ *[0-9]*\./d;s/^.* \([0-9]*%\).*$/\r'"${outStr}"'\1/' |\ | |
457 | 457 | tr -d '\n' >$outStream |
458 | 458 | ;; |
459 | 459 | esac |
460 | 460 | ;; |
461 | 461 | o) |
462 | 462 | outFile="`printf %02d ${trackNr}`-${tTitle[$i]}.ogg" |
463 | - outStr="track-$trackNr => ${outFile}: " | |
463 | + outStr="track-$trackNr => ${outFile/\//-}: " | |
464 | 464 | |
465 | 465 | ( |
466 | 466 | exec 2>&1 |
... | ... | @@ -469,21 +469,21 @@ do |
469 | 469 | -G "${dGenre}" -t "${tTitle[$i]}" \ |
470 | 470 | -N "${trackNr}" -d "${dYear}" \ |
471 | 471 | -c "" \ |
472 | - -o "${encodingDir}/${outFile}" - 2>/dev/null | |
472 | + -o "${encodingDir}/${outFile/\//-}" - 2>/dev/null | |
473 | 473 | ) | tr '\r' '\n' |\ |
474 | - sed '/^ [0-9]/!d;s/^.* \([0-9]*%\).*$/\r'"${outStr}"'\1/' |\ | |
474 | + sed '/^ [0-9]/!d;/^ *[0-9]*\./d;s/^.* \([0-9]*%\).*$/\r'"${outStr}"'\1/' |\ | |
475 | 475 | tr -d '\n' >$outStream |
476 | 476 | ;; |
477 | 477 | w) |
478 | 478 | outFile="`printf %02d ${trackNr}`-${tTitle[$i]}.wav" |
479 | - outStr="track-$trackNr => ${outFile}: " | |
479 | + outStr="track-$trackNr => ${outFile/\//-}: " | |
480 | 480 | |
481 | 481 | ( |
482 | 482 | exec 2>&1 |
483 | 483 | cdda2wav -H -D/dev/cdrom -I${cddaIf} -t${trackNr} - >\ |
484 | - "${encodingDir}/${outFile}" | |
484 | + "${encodingDir}/${outFile/\//-}" | |
485 | 485 | ) | tr '\r' '\n' |\ |
486 | - sed '/^ [0-9]/!d;s/^.* \([0-9]*%\).*$/\r'"${outStr}"'\1/' |\ | |
486 | + sed '/^ [0-9]/!d;/^ *[0-9]*\./d;s/^.* \([0-9]*%\).*$/\r'"${outStr}"'\1/' |\ | |
487 | 487 | tr -d '\n' >$outStream |
488 | 488 | ;; |
489 | 489 | esac | ... | ... |
... | ... | @@ -464,7 +464,7 @@ function getCDInfo |
464 | 464 | if [ "x$delimiter" != "x" ] |
465 | 465 | then |
466 | 466 | eval "`echo "$cddb" | tr -d '\r' | sed ' |
467 | - /TTITLE/s/^TTITLE\([0-9]*\)=\(\(.*\)'"$delimiter"'\)*\(.*\)$/tArtist[\1]="\3";tTitle[\1]="\4"/p | |
467 | + /TTITLE/s/^TTITLE\([0-9]*\)=\(\(.*\)'"${delimiter/\//\\/}"'\)*\(.*\)$/tArtist[\1]="\3";tTitle[\1]="\4"/p | |
468 | 468 | d'`" |
469 | 469 | fi |
470 | 470 | fi | ... | ... |
Please
register
or
login
to post a comment