Fixed ranger scope for comicbooks (apparently broken in update)
This commit is contained in:
parent
14ff1531cb
commit
143a9b7921
|
@ -87,6 +87,14 @@ handle_extension() {
|
||||||
|
|
||||||
handle_image() {
|
handle_image() {
|
||||||
local mimetype="${1}"
|
local mimetype="${1}"
|
||||||
|
|
||||||
|
case "${FILE_EXTENSION_LOWER}" in
|
||||||
|
# Comic book previews
|
||||||
|
cbz|cbr|epub)
|
||||||
|
comicthumb "${FILE_PATH}" "${IMAGE_CACHE_PATH}" 512 > /dev/null 2>&1 && exit 6
|
||||||
|
exit 1;;
|
||||||
|
esac
|
||||||
|
|
||||||
case "${mimetype}" in
|
case "${mimetype}" in
|
||||||
# SVG
|
# SVG
|
||||||
image/svg+xml)
|
image/svg+xml)
|
||||||
|
@ -109,13 +117,6 @@ handle_image() {
|
||||||
application/pdf)
|
application/pdf)
|
||||||
pdftoppm -jpeg -singlefile "$path" "${cached//.jpg}" && exit 6;;
|
pdftoppm -jpeg -singlefile "$path" "${cached//.jpg}" && exit 6;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
case "${FILE_EXTENSION_LOWER}" in
|
|
||||||
# Comic book previews
|
|
||||||
cbz|cbr|epub)
|
|
||||||
comicthumb "$path" "$cached" 512 > /dev/null 2>&1 && exit 6 || exit 1;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
handle_mime() {
|
handle_mime() {
|
||||||
|
@ -161,7 +162,8 @@ handle_fallback() {
|
||||||
|
|
||||||
|
|
||||||
handle_extension
|
handle_extension
|
||||||
MIMETYPE="$( file --dereference --brief --mime-type -- "${FILE_PATH}" )"
|
#MIMETYPE="$( file --dereference --brief --mime-type -- "${FILE_PATH}" )"
|
||||||
|
MIMETYPE="$(xdg-mime query filetype "${FILE_PATH}" )"
|
||||||
if [[ "${PV_IMAGE_ENABLED}" == 'True' ]]; then
|
if [[ "${PV_IMAGE_ENABLED}" == 'True' ]]; then
|
||||||
handle_image "${MIMETYPE}"
|
handle_image "${MIMETYPE}"
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Reference in New Issue
Block a user