05-12-2010, 09:36 PM | #1 |
Member
Posts: 11
Karma: 10
Join Date: May 2009
Device: Sony PRS-505
|
Bug: entries with multiple formats trigger multiple conversions
Steps to reproduce:
1. Create a book entry that contains say, a LIT and a PDF file. 2. Connect Sony reader. 3. Select Send to device. 4. Get asked multiple times if you want to convert the file. Answer Yes. 5. Check log and see that multiple conversions have indeed been performed. |
05-13-2010, 09:20 AM | #2 |
creator of calibre
Posts: 44,391
Karma: 23798586
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
That's weird, if yo uhave a pdf file, it should be sent t the SONY directly, since SONYs support PDF.
|
Advert | |
|
05-13-2010, 04:48 PM | #3 |
Member
Posts: 11
Karma: 10
Join Date: May 2009
Device: Sony PRS-505
|
I have disabled PDF support in the Device Interface plugin for the Sony, since I prefer converting it to LRF instead. Most of the PDFs I have were not designed/created for PDF to begin with, but is more of a backup format. Still - it shouldn't do multiple file conversions like I described. It did put the LIT file on the reader like it was supposed to thankfully.
|
05-13-2010, 06:31 PM | #4 |
creator of calibre
Posts: 44,391
Karma: 23798586
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
I don't see this behavior, what OS are you on?
|
05-14-2010, 09:40 AM | #5 |
Member
Posts: 11
Karma: 10
Join Date: May 2009
Device: Sony PRS-505
|
Windows 7 64 bit, running Calibre 0.6.52. It's been like this for several revisions of Calibre at least, but I can't pinpoint when it started since I usually would convert manually to LRF first before using send to device. It's only when I discovered I could change the default priority from EPUB to LRF for Sony readers that I started trying out the send to device functionality.
Last edited by flinx1; 05-14-2010 at 09:44 AM. |
Advert | |
|
05-14-2010, 10:24 AM | #6 |
creator of calibre
Posts: 44,391
Karma: 23798586
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
OK open a ticket an I'll look at it the next time I'm in windows.
|
05-14-2010, 01:30 PM | #7 |
Grand Sorcerer
Posts: 11,950
Karma: 7225107
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
|
Found the problem, but am not sure how to fix it.
When I start calibre and do copies, I am only asked once. If I go into preferences, do nothing, and press OK, I am from that point asked twice. If I go into preferences again and click OK again, I am now asked 3 times. --- enter geek mode --- The problem arises because the the accept branch in gui2.ui.do_config calls create_device_menu(), which seems to register the signal handler again. Somehow the existing signal handlers must be deleted. My guess is each of the instances of DeviceMenu are being held because they are referenced by an event handler. The fix might be to disconnect the existing handlers if _sync_menu is not None, but as this kind of thing is out of my league, I am not at all certain. --- exit geek mode --- |
05-14-2010, 01:55 PM | #8 |
Wizard
Posts: 4,004
Karma: 177841
Join Date: Dec 2009
Device: WinMo: IPAQ; Android: HTC HD2, Archos 7o; Java:Gravity T
|
|
05-14-2010, 11:33 PM | #9 |
creator of calibre
Posts: 44,391
Karma: 23798586
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
|
05-14-2010, 11:46 PM | #10 |
creator of calibre
Posts: 44,391
Karma: 23798586
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
Fix committed.
|
05-15-2010, 05:18 AM | #11 |
Grand Sorcerer
Posts: 11,950
Karma: 7225107
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
|
Another learning experience.
Looking at the fix, I see that the problem was the multiple connections to the button. As the button does not get remade when the menu is reinstated, each connection was remembered. I didn't note that the lifetime of the button was different from the lifetime of the menu. |
05-15-2010, 11:10 AM | #12 |
creator of calibre
Posts: 44,391
Karma: 23798586
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
The reason for that is that the button (to be precise, the QAction) comes from the .ui file where as the menu is created programmatically and assigned to the action dynamically, each time calibre is reconfigured.
|
05-21-2010, 06:23 AM | #13 |
Member
Posts: 11
Karma: 10
Join Date: May 2009
Device: Sony PRS-505
|
Just wanted to say thanks for fixing this .
|
Thread Tools | Search this Thread |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
<Command Line> Add multiple books in multiple formats | himitsu | Calibre | 8 | 09-25-2010 11:07 PM |
Multiple output formats? | jum | Calibre | 1 | 07-16-2010 01:15 AM |
Managing conversions with multiple readers | jackie_w | Calibre | 2 | 05-28-2010 02:10 PM |
Multiple formats - What gets sent | edbro | Calibre | 2 | 01-20-2010 08:38 PM |
Trying Multiple Formats on Kindle DX | Gideon | Amazon Kindle | 5 | 06-12-2009 08:30 AM |