mirror of
https://github.com/KrumpetPirate/AAXtoMP3.git
synced 2024-11-18 03:08:57 +01:00
Merge pull request #190 from bensaufley/fix/consistent_grep
Use GREP variable everywhere
This commit is contained in:
commit
31507139c8
6
AAXtoMP3
6
AAXtoMP3
@ -555,11 +555,11 @@ CHAPTER\((.key))NAME=\(.value.title)"' "${extra_chapter_file}" > "${tmp_chapter_
|
|||||||
if [[ "${library_file_exists}" == 1 ]]; then
|
if [[ "${library_file_exists}" == 1 ]]; then
|
||||||
asin=$(jq -r '.content_metadata.content_reference.asin' "${extra_chapter_file}")
|
asin=$(jq -r '.content_metadata.content_reference.asin' "${extra_chapter_file}")
|
||||||
if [[ ! -z "${asin}" ]]; then
|
if [[ ! -z "${asin}" ]]; then
|
||||||
lib_entry=$(grep "^${asin}" "${library_file}")
|
lib_entry=$($GREP "^${asin}" "${library_file}")
|
||||||
if [[ ! -z "${lib_entry}" ]]; then
|
if [[ ! -z "${lib_entry}" ]]; then
|
||||||
series_title=$(echo "${lib_entry}" | awk -F '\t' '{print $6}')
|
series_title=$(echo "${lib_entry}" | awk -F '\t' '{print $6}')
|
||||||
series_sequence=$(echo "${lib_entry}" | awk -F '\t' '{print $7}')
|
series_sequence=$(echo "${lib_entry}" | awk -F '\t' '{print $7}')
|
||||||
sed -i "/^ Metadata:/a\\
|
$SED -i "/^ Metadata:/a\\
|
||||||
series : ${series_title}\\
|
series : ${series_title}\\
|
||||||
series_sequence : ${series_sequence}" "${metadata_file}"
|
series_sequence : ${series_sequence}" "${metadata_file}"
|
||||||
fi
|
fi
|
||||||
@ -800,7 +800,7 @@ do
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
extra_crop_cover=''
|
extra_crop_cover=''
|
||||||
cover_width=$(ffprobe -i "${cover_file}" 2>&1 | grep -Po "[0-9]+(?=x[0-9]+)")
|
cover_width=$(ffprobe -i "${cover_file}" 2>&1 | $GREP -Po "[0-9]+(?=x[0-9]+)")
|
||||||
if (( ${cover_width} % 2 == 1 )); then
|
if (( ${cover_width} % 2 == 1 )); then
|
||||||
if [ "$((${loglevel} > 1))" == "1" ]; then
|
if [ "$((${loglevel} > 1))" == "1" ]; then
|
||||||
log "Cover ${cover_file} has odd width ${cover_width}, setting extra_crop_cover to make even."
|
log "Cover ${cover_file} has odd width ${cover_width}, setting extra_crop_cover to make even."
|
||||||
|
Loading…
Reference in New Issue
Block a user