View Single Post
Old 03-02-2018, 11:32 PM   #2686
dragonkore
Junior Member
dragonkore began at the beginning.
 
Posts: 5
Karma: 10
Join Date: Mar 2015
Device: Kindle Voyage
Quote:
Originally Posted by Ruskie_it View Post
Perhaps it should go like that:

Code:
# Check if the book was a KFX...
if [ "${last_read_mime}" == "application/x-kfx-ebook" ] ; then
	# We want the metadata sidecar file, not the book itself...
	last_read_kfx="${last_read_file%.*}.sdr/assets/metadata.kfx"
	# Check that it exists...
	if [ ! -f "${last_read_kfx}" ] ; then
		last_read_kfx = last_read_file
	fi
	# Use KFX Meta.
	...
That is, if the metadata.kfx sidecar does not exist, then pass to the kfxmeta.py the file itself.

Anybody of good will can validate the syntax at least?

It looked good to me so I tried it and, along with the updated kfxmeta.py, I'm finally getting covers for books that before wouldn't show. Bravo.
dragonkore is offline   Reply With Quote