How to determine custom column type?
I've been working on an an interface plugin that enables audiobook support through M3U files, which are simple playlists for the actual audiobook audiofiles which are stored outside of Calibre.
I've got it working pretty well for my needs, but decided to clean it up sufficiently to share with the community. Part of this effort is to add the ability to define which custom columns to use for importing the various audiofile metadata (sample rate, bitrate, # files, duration, etc.)
I want to be able to check that the user has configured the desired custom columns correctly. It's pretty straightforward to check and verify that a custom column exists or not, but what's the best way of making sure that the column is of the correct type (integer, floating point, text, etc.)? Looking through calibre code I've seen mention of field metadata, but I couldn't quite figure out the best way to access it.
What would be the best way to check custom column type?
Thanks in advance for any help!
|