diff options
author | DLFW <daniel@llin.info> | 2023-07-19 00:16:57 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-07-18 18:16:57 -0400 |
commit | ad6fcad33033f0966874588590b70963b23f0b99 (patch) | |
tree | cfe3d19c02c6356b807910f52313283652c24895 | |
parent | 05d47fa451b89f700699f9bebc0a9746a645f2e3 (diff) |
Fix docs for combined text and image preview (#363)
Fixed a “bug” in the recipe for combining text and image previews.
Images at a location whose path contains a space were not shown with the
calculated y-offset.
-rw-r--r-- | docs/image_previews/combined_with_text.md | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/docs/image_previews/combined_with_text.md b/docs/image_previews/combined_with_text.md index 39dd8b3..b194ca3 100644 --- a/docs/image_previews/combined_with_text.md +++ b/docs/image_previews/combined_with_text.md @@ -31,7 +31,7 @@ case "$mimetype" in tags=$(tmsu_tag_list) echo "$dimension" echo "$tags" - meta_file="$(get_preview_meta_file $path)" + meta_file=$(get_preview_meta_file "$path") let y_offset=`printf "${tags}" | sed -n '=' | wc -l`+2 echo "y-offset $y_offset" > "$meta_file" exit 4 @@ -52,7 +52,7 @@ After we have the y-offset available, we adapt the “preview shown” hook scri case "$mimetype" in image/png | image/jpeg) - meta_file="$(get_preview_meta_file $path)" + meta_file=$(get_preview_meta_file "$path") y_offset=`cat "$meta_file" | grep "y-offset" | awk '{print $2}'` y=$(( $y + $y_offset )) show_image "$path" $x $y $width $height |