Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Calibre > Development

Notices

Reply
 
Thread Tools Search this Thread
Old 11-20-2019, 02:40 AM   #1
pl000070
Junior Member
pl000070 began at the beginning.
 
Posts: 3
Karma: 10
Join Date: Nov 2019
Device: PocketBook InkPad3
webengine-dialog and database connection

Hello All,

Please help on how to connect to current database from another Calibre instance with webengine-dialog.

I just registered to ask this question. I've got a private plugin that allows to find book metadata by manual search in the Internet (I noticed that sometimes standard import metadata plugins are completely lost e.g. when book title is short and non-unique). Recently I upgraded to Calibre 4 and discovered QWebEngineView. I implemented webengine-dialog but I have problem how to connect to current database without active GUI. I need to store metadata read from Web page. I don't know how to use RC signal as it seems that list of possible functions is hardcoded, so I think I need to write directly to database.

Thanks in advance for any help.
pl000070 is offline   Reply With Quote
Old 11-20-2019, 02:49 AM   #2
pl000070
Junior Member
pl000070 began at the beginning.
 
Posts: 3
Karma: 10
Join Date: Nov 2019
Device: PocketBook InkPad3
webengine-dialog and database connection

Just to add to my question: I tried to use
Code:
from calibre.library import db
but I cannot use db afterwards.
pl000070 is offline   Reply With Quote
Advert
Old 11-20-2019, 10:13 PM   #3
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 43,860
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
You cannot connect to a database from webengine-dialog. Instead have your webengine-dialog process store the metadata in a temp file/folder and read it from there in the main process after the dialog is closed.
kovidgoyal is offline   Reply With Quote
Old 11-21-2019, 05:41 PM   #4
pl000070
Junior Member
pl000070 began at the beginning.
 
Posts: 3
Karma: 10
Join Date: Nov 2019
Device: PocketBook InkPad3
Thank you very much for the advice and quick answer. I'll do this way. Topic closed.
pl000070 is offline   Reply With Quote
Reply

Tags
current database, qwebengineview, thread, webengine-dialog


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Connection issue: content server works / wireless connection doesn't yunadwb Calibre Companion 4 07-18-2015 02:49 PM
Help with dialog... VydorScope Writers' Corner 9 06-14-2013 09:57 PM
Can the wifi connection dialog be fooled? TheLazy1 Kindle Developer's Corner 0 05-27-2011 01:45 AM
Calibre Database cp Kindle Database mitch13 Library Management 1 05-22-2011 07:33 PM
Wireless internet connection frustrating IDS connection Socrates iRex 8 10-21-2009 12:46 PM


All times are GMT -4. The time now is 01:36 PM.


MobileRead.com is a privately owned, operated and funded community.