05-16-2010, 01:09 PM | #16 |
Grand Sorcerer
Posts: 11,703
Karma: 6658935
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
|
Is there ever? I didn't touch that code. I suppose that there should be.
I have committed changes that might help. I think that the problem might come from the mix of linux and windows paths, using different separators. I have changed things to normalize the paths to the correct separator before asking for file manipulations. In addition, there is a print statement at the end of loading the cache telling whether the cache is considered correct. It should be, unless you manually delete things. |
05-16-2010, 01:12 PM | #17 |
Wizard
Posts: 4,004
Karma: 177841
Join Date: Dec 2009
Device: WinMo: IPAQ; Android: HTC HD2, Archos 7o; Java:Gravity T
|
Very minor: on large drives, the space available measured in GB is shown correctly as GB in the library, but for really large drives, the space available measured in TB appears as "B."
It looks correct, just missing the "T" so it looks like only a few bytes are available. (This is probably Kovid's issue, but I didn't feel like doing a full bug report for such a minor point. Plus, not many ereaders will have TB of space free) |
Advert | |
|
05-16-2010, 01:14 PM | #18 |
creator of calibre
Posts: 43,778
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
IIRC this was if no metadata is found, in which case it asusmes the filename conforms to the pattern that used to be used when sending files to the device and tries that. This can probably be removed now.
|
05-16-2010, 01:25 PM | #19 | |
creator of calibre
Posts: 43,778
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
Quote:
|
|
05-16-2010, 01:33 PM | #20 |
Wizard
Posts: 4,004
Karma: 177841
Join Date: Dec 2009
Device: WinMo: IPAQ; Android: HTC HD2, Archos 7o; Java:Gravity T
|
Turning now to delete issue:
It seems to delete fine from the SD card via USB reader mount. Sorry I can't test the HD2 - the wife has it. The delete problem is intermittent on the the HD. I've tried C: (programs and boot) and E: (large raid). Both are intermittent. I checked: Code:
def delete_books(self, paths, end_session=True): for i, path in enumerate(paths): print 'i: ', i print 'path: ', path self.report_progress((i+1) / float(len(paths)), _('Removing books from device...')) if os.path.exists(path): print 'Path exists.' # Delete the ebook os.unlink(path) I'm not sure how important this is, since it seems to only appear when connected to a local drive. |
Advert | |
|
05-16-2010, 01:41 PM | #21 | |
Grand Sorcerer
Posts: 11,703
Karma: 6658935
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
|
Quote:
Code:
os.path.exists(path) Return True if path refers to an existing path. Returns False for broken symbolic links. On some platforms, this function may return False if permission is not granted to execute os.stat() on the requested file, even if the path physically exists. I have committed code to remove the 'exists' check. It serves no purpose, really. If this works, or at least is better, then I will also remove them from the code removing ancillary files. |
|
05-16-2010, 01:45 PM | #22 |
Grand Sorcerer
Posts: 11,703
Karma: 6658935
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
|
I haven't committed the changes yet. Something strange is happening, which I hope might lead to an explanation.
|
05-16-2010, 01:45 PM | #23 | |||
Wizard
Posts: 4,004
Karma: 177841
Join Date: Dec 2009
Device: WinMo: IPAQ; Android: HTC HD2, Archos 7o; Java:Gravity T
|
Quote:
Quote:
Code:
Job: 7 Delete books from device finished No details available. Job: 8 Send metadata to device finished No details available. i: 0 path: \Adair, Cherry\T-FLAC 2\Kiss and Tell - Cherry Adair.txt i: 1 path: \Adams, Douglas\The Private Life of Genghis Khan - Douglas Adams.lit i: 2 path: \Adams, Richard\Watership Down - Richard Adams.pdf i: 3 path: \Adams, Robert\Castaways 4\Of Chiefs and Champions - Robert Adams.lit Job: 9 Delete books from device finished No details available. Job: 9 Delete books from device finished No details available. Job: 10 Send metadata to device finished No details available. Quote:
|
|||
05-16-2010, 01:49 PM | #24 |
Wizard
Posts: 4,004
Karma: 177841
Join Date: Dec 2009
Device: WinMo: IPAQ; Android: HTC HD2, Archos 7o; Java:Gravity T
|
|
05-16-2010, 01:53 PM | #25 |
Wizard
Posts: 4,004
Karma: 177841
Join Date: Dec 2009
Device: WinMo: IPAQ; Android: HTC HD2, Archos 7o; Java:Gravity T
|
|
05-16-2010, 01:58 PM | #26 |
Grand Sorcerer
Posts: 11,703
Karma: 6658935
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
|
OK, code pushed. I had to leave the exists in there, because python raises an exception if the file doesn't exist (docs don't mention this).
I did find a case where the paths were wrong. If you deleted a book in the same connection where you added it, the path was wrong and things didn't work. This has been fixed. |
05-16-2010, 02:00 PM | #27 |
creator of calibre
Posts: 43,778
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
@chaley: I'm going to hold off merging and reviewing until you have the gremlins sorted out.
|
05-16-2010, 02:02 PM | #28 | |
Grand Sorcerer
Posts: 11,703
Karma: 6658935
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
|
Quote:
The problem came (yet again) because of the mixture of slashes and backslashes in paths. Because the normalized path is frontslashed, a comparison broke and the prefix was not added. |
|
05-16-2010, 02:34 PM | #29 | |
Wizard
Posts: 4,004
Karma: 177841
Join Date: Dec 2009
Device: WinMo: IPAQ; Android: HTC HD2, Archos 7o; Java:Gravity T
|
Quote:
Here's what I see now: 1) Failure to delete issue - fixed 2) Author sort order - fixed 3) TB label - not fixed in your code, but Kovid says it's fixed in his to exabytes 4) cache recalculate/metadata - seems fixed, but may need some more testing:variations of turning options on/off changing regexes, deleting cache file, etc. New bug: I get partially disconnected from the folder. I still see the folder in the library bar. I see the folder contents and can delete items. However, I can't "disconnect" it, nor can I send a book to it. I can "connect to folder" if I want, even though it's still there in the library bar and I have some access. It seems to happen when switching back to the main and/or taking focus away from calibre. |
|
05-16-2010, 02:39 PM | #30 | |||
Grand Sorcerer
Posts: 11,703
Karma: 6658935
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
|
Quote:
Quote:
Quote:
|
|||
Thread Tools | Search this Thread |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Copia beta test - Get Your Invite Now! | Nate the great | Announcements | 34 | 11-18-2010 07:48 PM |
Beta Test of new Kobo Driver | timlegge | Calibre | 58 | 06-22-2010 07:37 AM |
Beta test of major new features | chaley | Calibre | 130 | 06-04-2010 08:52 PM |
DR800 V2 Beta Firmware Battery Test | CoolDragon | iRex | 29 | 05-11-2010 05:37 AM |
Mobile Forum Beta Test Here! | Alexander Turcic | Announcements | 12 | 03-10-2004 05:38 PM |