View Single Post
Old 05-31-2017, 07:11 PM   #2509
nemiere
Member
nemiere ought to be getting tired of karma fortunes by now.nemiere ought to be getting tired of karma fortunes by now.nemiere ought to be getting tired of karma fortunes by now.nemiere ought to be getting tired of karma fortunes by now.nemiere ought to be getting tired of karma fortunes by now.nemiere ought to be getting tired of karma fortunes by now.nemiere ought to be getting tired of karma fortunes by now.nemiere ought to be getting tired of karma fortunes by now.nemiere ought to be getting tired of karma fortunes by now.nemiere ought to be getting tired of karma fortunes by now.nemiere ought to be getting tired of karma fortunes by now.
 
Posts: 24
Karma: 333762
Join Date: Aug 2011
Location: Madrid, Spain
Device: Kindle Voyage
Quick and dirty patch to kfxmeta.py for "new" kfx files

Last version of this excellent ScreenSavers hack fail to extract a cover from some ebooks in a "new slight variation" of kfx format developed by Amazon from last January.

While waiting for a proper fix by masters @NiLuJe or @jhowell, you can try this quick and dirty patch to file
Code:
src/linkss/bin/kfxmeta.py
:

Code:
$ diff kfxmeta-orig.py kfxmeta.py
264c264,267
<             for value1 in entity_value[b"categorised_metadata"]:
---
>             target = entity_value
>             if entity_value.has_key("type") and entity_value["type"] == b"P2":
>                 target = entity_value["value"]
>             for value1 in target[b"categorised_metadata"]:
It works for all my kfx amazon ebooks ("old" and "new" variations).
nemiere is offline   Reply With Quote