Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Calibre

Notices

Reply
 
Thread Tools Search this Thread
Old 08-03-2013, 09:48 AM   #106
kiwidude
Calibre Plugins Developer
kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.
 
Posts: 4,654
Karma: 2162064
Join Date: Oct 2010
Location: Australia
Device: Kindle Oasis
Hi Kovid

Sorry not been reading the forums much lately other than monitoring the plugins subforum as very busy. Is there some summary you can put in the Development forum or something that summarises any dos and donts with with the new API/changes you have made? From a brief skim of this thread (and the lack of comments on my plugin threads) it seems there is a level of backward compatibility in there, but if there are specific things I should be changing/supporting in them that would be cool. Specifically I guess concerning your new best practices where changed for persisting/retrieving data for one or a set of books.
kiwidude is offline   Reply With Quote
Old 08-03-2013, 11:24 AM   #107
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: 44,048
Karma: 22669822
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
You should not need to do anything at all. It may happen that some operations, typically updating a field in the database for many books, one at a time, becomes slower, in which case you should re-write it to use the new api. Other than that, you should not need to do anything, and that only if you or your users notice some slowness. Basically, where you had:

Code:
for book_id in book_ids:
   db.set_something(book_id, value)
replace it with

Code:
db.new_api.set_field(something, {book_id:value for book_id in book_ids})
kovidgoyal is offline   Reply With Quote
Advert
Old 08-03-2013, 09:12 PM   #108
kiwidude
Calibre Plugins Developer
kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.
 
Posts: 4,654
Karma: 2162064
Join Date: Oct 2010
Location: Australia
Device: Kindle Oasis
Awesome, thx Kovid. Ignore till someone complains, like that
kiwidude is offline   Reply With Quote
Old 08-04-2013, 10:06 AM   #109
johnwhelan
Zealot
johnwhelan ought to be getting tired of karma fortunes by now.johnwhelan ought to be getting tired of karma fortunes by now.johnwhelan ought to be getting tired of karma fortunes by now.johnwhelan ought to be getting tired of karma fortunes by now.johnwhelan ought to be getting tired of karma fortunes by now.johnwhelan ought to be getting tired of karma fortunes by now.johnwhelan ought to be getting tired of karma fortunes by now.johnwhelan ought to be getting tired of karma fortunes by now.johnwhelan ought to be getting tired of karma fortunes by now.johnwhelan ought to be getting tired of karma fortunes by now.johnwhelan ought to be getting tired of karma fortunes by now.
 
Posts: 104
Karma: 475752
Join Date: Jan 2009
Device: Kobo Touch, Cybook Gen 3, Google Nexus7
I'm having a problem when trying to delete a book. The first book I tried twice, then I tried another book. In all three cases I logged out of the windows account then restarted Calibre as it appeared to be unresponsive.

Cheerio John

calibre, version 0.9.42
ERROR: Unhandled exception: <b>LockingError</b>:can't downgrade SHLock object

Traceback (most recent call last):
File "site-packages\calibre\gui2\library\models.py", line 932, in data
File "site-packages\calibre\gui2\library\models.py", line 693, in func
File "site-packages\calibre\db\cache.py", line 54, in ans
File "site-packages\calibre\db\locking.py", line 208, in __enter__
File "site-packages\calibre\db\locking.py", line 79, in acquire
File "site-packages\calibre\db\locking.py", line 149, in _acquire_shared
LockingError: can't downgrade SHLock object
calibre, version 0.9.42
ERROR: Unhandled exception: <b>LockingError</b>:can't downgrade SHLock object

Traceback (most recent call last):
File "site-packages\calibre\gui2\library\models.py", line 932, in data
File "site-packages\calibre\gui2\library\models.py", line 693, in func
File "site-packages\calibre\db\cache.py", line 54, in ans
File "site-packages\calibre\db\locking.py", line 208, in __enter__
File "site-packages\calibre\db\locking.py", line 79, in acquire
File "site-packages\calibre\db\locking.py", line 149, in _acquire_shared
LockingError: can't downgrade SHLock object

calibre, version 0.9.42
ERROR: Unhandled exception: <b>LockingError</b>:can't downgrade SHLock object

Traceback (most recent call last):
File "site-packages\calibre\gui2\library\models.py", line 932, in data
File "site-packages\calibre\gui2\library\models.py", line 693, in func
File "site-packages\calibre\db\cache.py", line 54, in ans
File "site-packages\calibre\db\locking.py", line 208, in __enter__
File "site-packages\calibre\db\locking.py", line 79, in acquire
File "site-packages\calibre\db\locking.py", line 149, in _acquire_shared
LockingError: can't downgrade SHLock object
johnwhelan is offline   Reply With Quote
Old 08-04-2013, 12:01 PM   #110
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: 44,048
Karma: 22669822
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
@johnwhelan: What exactly were you doing when this happened. Simply deleting a book doesn't seem to cause it. Also anything out of the ordinary about your library?
kovidgoyal is offline   Reply With Quote
Advert
Old 08-04-2013, 03:46 PM   #111
johnwhelan
Zealot
johnwhelan ought to be getting tired of karma fortunes by now.johnwhelan ought to be getting tired of karma fortunes by now.johnwhelan ought to be getting tired of karma fortunes by now.johnwhelan ought to be getting tired of karma fortunes by now.johnwhelan ought to be getting tired of karma fortunes by now.johnwhelan ought to be getting tired of karma fortunes by now.johnwhelan ought to be getting tired of karma fortunes by now.johnwhelan ought to be getting tired of karma fortunes by now.johnwhelan ought to be getting tired of karma fortunes by now.johnwhelan ought to be getting tired of karma fortunes by now.johnwhelan ought to be getting tired of karma fortunes by now.
 
Posts: 104
Karma: 475752
Join Date: Jan 2009
Device: Kobo Touch, Cybook Gen 3, Google Nexus7
Quote:
Originally Posted by kovidgoyal View Post
@johnwhelan: What exactly were you doing when this happened. Simply deleting a book doesn't seem to cause it. Also anything out of the ordinary about your library?
I run Calibre in two Windows accounts with different books in the libraries.

I'm running win 7 64 bit, with windows update the second account has 2,100 books the first 1,000+books.

On both accounts I searched for an author first then wishing to bring in an updated book I attempted to delete the book first.

switching to the second account the second account gives:
calibre, version 0.9.42
ERROR: Unhandled exception: <b>LockingError</b>:can't downgrade SHLock object

Traceback (most recent call last):
File "site-packages\calibre\gui2\library\models.py", line 932, in data
File "site-packages\calibre\gui2\library\models.py", line 685, in func
File "site-packages\calibre\db\cache.py", line 54, in ans
File "site-packages\calibre\db\locking.py", line 208, in __enter__
File "site-packages\calibre\db\locking.py", line 79, in acquire
File "site-packages\calibre\db\locking.py", line 149, in _acquire_shared
LockingError: can't downgrade SHLock object

switching back to the original database format I can delete and replace the book.

Only one copy of Calibre was running at the time. Hope that helps.

Cheerio John
johnwhelan is offline   Reply With Quote
Old 08-04-2013, 08:52 PM   #112
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: 44,048
Karma: 22669822
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
To be clear, the sequence of actions was:

1) In account one, do a search
2) Switch to account 2
3) do a search
4) switch back to account 1
5) delete a book
6) switch back to account 2
7) get an error

Also you say only one copy of calibre was running at the time. You mean one copy in each account, or one copy globally?

EDIT: Also are you running the 64 bit or 32 bit version of calibre?

Last edited by kovidgoyal; 08-04-2013 at 09:09 PM.
kovidgoyal is offline   Reply With Quote
Old 08-04-2013, 09:48 PM   #113
johnwhelan
Zealot
johnwhelan ought to be getting tired of karma fortunes by now.johnwhelan ought to be getting tired of karma fortunes by now.johnwhelan ought to be getting tired of karma fortunes by now.johnwhelan ought to be getting tired of karma fortunes by now.johnwhelan ought to be getting tired of karma fortunes by now.johnwhelan ought to be getting tired of karma fortunes by now.johnwhelan ought to be getting tired of karma fortunes by now.johnwhelan ought to be getting tired of karma fortunes by now.johnwhelan ought to be getting tired of karma fortunes by now.johnwhelan ought to be getting tired of karma fortunes by now.johnwhelan ought to be getting tired of karma fortunes by now.
 
Posts: 104
Karma: 475752
Join Date: Jan 2009
Device: Kobo Touch, Cybook Gen 3, Google Nexus7
In the first account select with search, try to delete, get the error. log off restart computer log on to second account select with search try to delete, get error.

I think I'm using 64 bit Calibre but can't see a way to confirm that immediately.

Cheerio John
johnwhelan is offline   Reply With Quote
Old 08-04-2013, 10:14 PM   #114
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: 44,048
Karma: 22669822
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
You can check 64bit by looking at the status bar at the bottom of the main calibre screen, it will say [64bit] if you are on 64bit.

So you're getting this error simply with a search followed by a delete? Can you post the metadata.db file from one of your libraries and also the search that you are using.
kovidgoyal is offline   Reply With Quote
Old 08-05-2013, 03:10 AM   #115
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: 44,048
Karma: 22669822
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
As a thank you to all you intrepid testers, here's early access to the first major new feature based on the new backend - A grid view for book covers (see attached screenshot).

You can get a build of calibre with it enabled from here:
http://download.calibre-ebook.com/betas/

To use it simply click the little button in the bottom right corner that has a grid icon on it.

You can change the cover sizes and background color via Preferences->Look & Feel->Cover Grid
Attached Thumbnails
Click image for larger version

Name:	snapshot3.jpg
Views:	242
Size:	269.0 KB
ID:	108934  
kovidgoyal is offline   Reply With Quote
Old 08-05-2013, 03:45 AM   #116
davidfor
Grand Sorcerer
davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.
 
Posts: 24,906
Karma: 47303822
Join Date: Jul 2011
Location: Sydney, Australia
Device: Kobo:Touch,Glo, AuraH2O, GloHD,AuraONE, ClaraHD, Libra H2O; tolinoepos
Very nice and quite fairly fast on my test library that has 1246 books. I was never liked the cover browser, but I could see myself using this.

Some things I can see:

- At first glance, the borders between the covers seem fairly large. I can see that people will ask to be able to adjust them.
- I had to add title to the details display. I think it is off by default, but for the cover display it is handy. That's mainly a comment to remind everyone that it can be turned on.
- While the covers are generating, the titles are displayed. I think having the author as well would be good.
- Any way to change the sorting?
- When I selected "A" in the authors in the tag browser, it filtered the books. But, when I did the same for series, it didn't show any books. Selecting a series worked. It looks like this works for all columns except series.
- I accidently opened the cover browser at the same time. The two worked together with no problems. I'm not sure if it should be allowed, but I can't really see a reason to block it.

David
davidfor is offline   Reply With Quote
Old 08-05-2013, 04:17 AM   #117
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: 44,048
Karma: 22669822
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
You can change the sort by right clicking. It also inherits whatever the last sort of the normal book list was.

As for clicking on the tag browser, it should have exactly the same effect as for the normal book list.

I can certainly make the cover spacing configurable.

I will have it display authors in addition to title when the cover is not available.

Last edited by kovidgoyal; 08-05-2013 at 04:43 AM.
kovidgoyal is offline   Reply With Quote
Old 08-05-2013, 06:18 AM   #118
davidfor
Grand Sorcerer
davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.
 
Posts: 24,906
Karma: 47303822
Join Date: Jul 2011
Location: Sydney, Australia
Device: Kobo:Touch,Glo, AuraH2O, GloHD,AuraONE, ClaraHD, Libra H2O; tolinoepos
Quote:
Originally Posted by kovidgoyal View Post
You can change the sort by right clicking. It also inherits whatever the last sort of the normal book list was.
There it is at the bottom of the menu. I missed it as the standard menu came up.
Quote:
As for clicking on the tag browser, it should have exactly the same effect as for the normal book list.
Your right, they work the same. Series is just different to the other columns.

I just noticed the animation when opening a book. Looks good.
davidfor is offline   Reply With Quote
Old 08-05-2013, 09:23 AM   #119
johnwhelan
Zealot
johnwhelan ought to be getting tired of karma fortunes by now.johnwhelan ought to be getting tired of karma fortunes by now.johnwhelan ought to be getting tired of karma fortunes by now.johnwhelan ought to be getting tired of karma fortunes by now.johnwhelan ought to be getting tired of karma fortunes by now.johnwhelan ought to be getting tired of karma fortunes by now.johnwhelan ought to be getting tired of karma fortunes by now.johnwhelan ought to be getting tired of karma fortunes by now.johnwhelan ought to be getting tired of karma fortunes by now.johnwhelan ought to be getting tired of karma fortunes by now.johnwhelan ought to be getting tired of karma fortunes by now.
 
Posts: 104
Karma: 475752
Join Date: Jan 2009
Device: Kobo Touch, Cybook Gen 3, Google Nexus7
Quote:
Originally Posted by kovidgoyal View Post
You can check 64bit by looking at the status bar at the bottom of the main calibre screen, it will say [64bit] if you are on 64bit.

So you're getting this error simply with a search followed by a delete? Can you post the metadata.db file from one of your libraries and also the search that you are using.
I downloaded the 64 bit version and get the same result.

calibre, version 0.9.42
ERROR: Unhandled exception: <b>LockingError</b>:can't downgrade SHLock object

Traceback (most recent call last):
File "site-packages\calibre\gui2\library\models.py", line 932, in data
File "site-packages\calibre\gui2\library\models.py", line 693, in func
File "site-packages\calibre\db\cache.py", line 54, in ans
File "site-packages\calibre\db\locking.py", line 208, in __enter__
File "site-packages\calibre\db\locking.py", line 79, in acquire
File "site-packages\calibre\db\locking.py", line 149, in _acquire_shared
LockingError: can't downgrade SHLock object

search joke

The metadata.db file is 3 mbs so I've reported a calibre bug and added as an attachment.

Bug #1208470

Cheerio John
johnwhelan is offline   Reply With Quote
Old 08-05-2013, 09:55 AM   #120
theducks
Well trained by Cats
theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.
 
theducks's Avatar
 
Posts: 30,018
Karma: 57259778
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
The cover grid works on XP SP3.

But I noticed something else strange happened.
I see a note that there is a Plugin update (there was none in main 42)
Launching that, It informs me that the Kindle collections is depecated.

So I uninstall as recommended.

Visiting the MR Index, the PI is still listed as active, so I use preferences to install it.

Same message update on restart

There is something about that PI as I have 16 others installed
Attached Thumbnails
Click image for larger version

Name:	KCdeprecated.jpg
Views:	200
Size:	17.9 KB
ID:	108945   Click image for larger version

Name:	KCdeprecated2.jpg
Views:	193
Size:	72.8 KB
ID:	108946  
theducks is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
MTP support: Testers needed kovidgoyal Calibre 68 09-21-2012 03:54 AM
shared backend database? perler Calibre 4 01-26-2012 05:37 AM
Windows testers needed kovidgoyal Calibre 51 11-21-2010 05:58 AM
OS X testers needed kovidgoyal Calibre 23 11-18-2010 12:11 PM
calibre ereader output testers needed user_none Other formats 24 05-11-2009 12:00 AM


All times are GMT -4. The time now is 03:23 PM.


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