I've been trying to adapt a metadata plugin for DJVU files (found on
https://github.com/aroig/metadata-readers if anybody's interested) but ran into an odd issue. The plugin does not work as is so I tried to debug and here's what I've found. The stream.name in get_metadata() is just the file name without the actual path. The original plugin is using os.path.abspath() which only makes things worse, applying the actual Calibre install folder instead of the actual file path.
I could not find any way to get the right path to the stream file, nothing in the API docs helps, and there seem to be no good examples of metadata plugins.
So, am I missing something or is it just a bug?
For reference, I am using Win64 build version 2.45. The bug was there in 2.37 (updated in the process of investigating).