![]() |
#1 |
Guru
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 808
Karma: 2416112
Join Date: Jan 2017
Location: Poland
Device: Various
|
Call fetch/download metadata from GUI plugin
During develop LubimyCzytac [Metadata Source Plugin] in config I allow to download number of pages and save to comment and/or as identifier "lcpages" (abbreviation from "LubimyCzytac pages").
Now I prepared auxiliary plugin named "LCpages" [GUI plugin]. Plugin move number of pages value from "lcpages" identifier to custom column (for example "#pages"). This option works as intended and rapidly. Code: Spoiler:
I would like to start fetch/download metadata from LubimyCzytac source (by LubimyCzytac plugin of course), and next run standard primary function (move value from identifier to custom column). I can call "Edit Metadata" window: Code:
def edycjametadanych(self): from calibre.library import db from calibre.gui2.metadata.single import edit_metadata db = db() row_list = list(range(len(db.data))) edit_metadata(db, row_list, 0) Code:
def _configure_lubimyczytac(self): from calibre.customize.ui import initialized_plugins for plugin in initialized_plugins(): if plugin.name == 'LubimyCzytac': if not plugin.is_customizable(): return info_dialog(self, _('Plugin not customizable'), _('Plugin: %s does not need customization')%plugin.name, show=True) from calibre.customize import InterfaceActionBase if isinstance(plugin, InterfaceActionBase) and not getattr(plugin, 'actual_iaction_plugin_loaded', False): return error_dialog(self, _('Must restart'), _('You must restart calibre before you can' ' configure the <b>%s</b> plugin')%plugin.name, show=True) plugin.do_user_config(self.parent()) Is possible call fetch/download metadata from GUI plugin and next run other functions? Code:
My plan: 1. Download metadata 2. Move value from ID to custom column 3. Delete ID Does my concept make sense? PS. Count Pages plugin supporting LubimyCzytac (thx davidfor) is OK, but I want to test my own solution – only for speed fill custom column once downloaded value. |
![]() |
![]() |
![]() |
Tags |
call, lcpages, lubimyczytac, plugin, problem |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
[GUI Plugin] Zotero Metadata Importer | DaltonST | Plugins | 295 | 03-22-2025 09:47 AM |
[GUI Plugin] Consolidate All Library Metadata (CALM) | DaltonST | Plugins | 334 | 02-02-2025 02:28 PM |
Regarding using metadata objects in identify method of metadata download plugin api | aprekates | Development | 1 | 07-06-2014 03:35 AM |
Getting custom metadata field in GUI plugin | SauliusP. | Development | 7 | 02-11-2012 01:31 AM |
[Metadata Download Plugin] Goodreads Metadata **Deprecated** | kiwidude | Plugins | 30 | 04-23-2011 02:10 PM |