Register Guidelines E-Books Search Today's Posts Mark Forums Read

Go Back   MobileRead Forums > E-Book Software > Calibre

Notices

Reply
 
Thread Tools Search this Thread
Old 05-16-2010, 01:09 PM   #16
chaley
"chaley", not "charley"
chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.
 
Posts: 5,203
Karma: 821512
Join Date: Jan 2010
Location: France
Device: Many android devices
Quote:
Originally Posted by Starson17 View Post
There's no confirm dialog on delete.
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.
chaley is offline   Reply With Quote
Old 05-16-2010, 01:12 PM   #17
Starson17
Wizard
Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.
 
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)
Starson17 is offline   Reply With Quote
 
Enthusiast
Old 05-16-2010, 01:14 PM   #18
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: 25,658
Karma: 4998489
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
Quote:
Originally Posted by chaley View Post
Under some conditions that I haven't yet figured out, it uses
re.compile(r'^(?P<title>[ \S]+?)[ _]-[ _](?P<author>[ \S]+?)_+\d+'))

The default in preferences is '(?P<title>.+) - (?P<author>[^_]+)'
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.
kovidgoyal is offline   Reply With Quote
Old 05-16-2010, 01:25 PM   #19
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: 25,658
Karma: 4998489
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
Quote:
Originally Posted by Starson17 View Post
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)
Fixed upto exabytes.
kovidgoyal is offline   Reply With Quote
Old 05-16-2010, 01:33 PM   #20
Starson17
Wizard
Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.
 
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)
The path is always valid (rooted in the linked folder), but it sometimes fails to enter "if os.path.exists(path):"

I'm not sure how important this is, since it seems to only appear when connected to a local drive.
Starson17 is offline   Reply With Quote
Old 05-16-2010, 01:41 PM   #21
chaley
"chaley", not "charley"
chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.
 
Posts: 5,203
Karma: 821512
Join Date: Jan 2010
Location: France
Device: Many android devices
Quote:
Originally Posted by Starson17 View Post
I'm not sure how important this is, since it seems to only appear when connected to a local drive.
I found the following in the python docs:
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.
Is it possible that you are running into UAC issues? I have mine turned off so I wouldn't see it, and in any event W7 is different from Vista.

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.
chaley is offline   Reply With Quote
Old 05-16-2010, 01:45 PM   #22
chaley
"chaley", not "charley"
chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.
 
Posts: 5,203
Karma: 821512
Join Date: Jan 2010
Location: France
Device: Many android devices
I haven't committed the changes yet. Something strange is happening, which I hope might lead to an explanation.
chaley is offline   Reply With Quote
Old 05-16-2010, 01:45 PM   #23
Starson17
Wizard
Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.
 
Posts: 4,004
Karma: 177841
Join Date: Dec 2009
Device: WinMo: IPAQ; Android: HTC HD2, Archos 7o; Java:Gravity T
Quote:
Originally Posted by chaley View Post
Is there ever? I didn't touch that code. I suppose that there should be.
I realize I'm dumping anything I see on you. I'm seeing stuff for the first time, since I didn't have an ereader. Yeah, I suppose there ought to be a delete confirmation, although it's less critical on the device if the books came from the main library .... but perhaps they didn't.

Quote:
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.
FYI, here's the output of the paths on a failed delete (see my print statements in your code). Separators look Windows OK to me. Note how it hits the path prints, but not the print 'Path exists.' statement inside the path existence test.

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:
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.
I'll grab the code again and see how it goes.
Starson17 is offline   Reply With Quote
Old 05-16-2010, 01:49 PM   #24
Starson17
Wizard
Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.
 
Posts: 4,004
Karma: 177841
Join Date: Dec 2009
Device: WinMo: IPAQ; Android: HTC HD2, Archos 7o; Java:Gravity T
Quote:
Originally Posted by chaley View Post
Is it possible that you are running into UAC issues?
UAC is off. Plus, it's intermittent. Seems almost like a timing issue.
Starson17 is offline   Reply With Quote
Old 05-16-2010, 01:53 PM   #25
Starson17
Wizard
Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.
 
Posts: 4,004
Karma: 177841
Join Date: Dec 2009
Device: WinMo: IPAQ; Android: HTC HD2, Archos 7o; Java:Gravity T
Quote:
Originally Posted by chaley View Post
I haven't committed the changes yet. Something strange is happening, which I hope might lead to an explanation.
I'm going to hold on an update then. I'll grab a bite to eat, and check later.
Starson17 is offline   Reply With Quote
Old 05-16-2010, 01:58 PM   #26
chaley
"chaley", not "charley"
chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.
 
Posts: 5,203
Karma: 821512
Join Date: Jan 2010
Location: France
Device: Many android devices
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.
chaley is offline   Reply With Quote
Old 05-16-2010, 02:00 PM   #27
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: 25,658
Karma: 4998489
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.
kovidgoyal is offline   Reply With Quote
Old 05-16-2010, 02:02 PM   #28
chaley
"chaley", not "charley"
chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.
 
Posts: 5,203
Karma: 821512
Join Date: Jan 2010
Location: France
Device: Many android devices
Quote:
Originally Posted by Starson17 View Post
FYI, here's the output of the paths on a failed delete (see my print statements in your code). Separators look Windows OK to me. Note how it hits the path prints, but not the print 'Path exists.' statement inside the path existence test.
That output is a perfect example of the bug I just fixed. Note that the 'prefix' (the path from the drive letter to the directory) is not there. It should be.

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.
chaley is offline   Reply With Quote
Old 05-16-2010, 02:34 PM   #29
Starson17
Wizard
Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.
 
Posts: 4,004
Karma: 177841
Join Date: Dec 2009
Device: WinMo: IPAQ; Android: HTC HD2, Archos 7o; Java:Gravity T
Quote:
Originally Posted by chaley View Post
That output is a perfect example of the bug I just fixed. Note that the 'prefix' (the path from the drive letter to the directory) is not there. It should be.
I saw that, but assumed it was supposed to be rooted at the connected folder.

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.
Starson17 is offline   Reply With Quote
Old 05-16-2010, 02:39 PM   #30
chaley
"chaley", not "charley"
chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.
 
Posts: 5,203
Karma: 821512
Join Date: Jan 2010
Location: France
Device: Many android devices
Quote:
Originally Posted by Starson17 View Post
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
Change has now propagated across all the repositories. Fixed in rev 5244.
Quote:
4) cache recalculate/metadata - seems fixed, but may need some more testing:variations of turning options on/off changing regexes, deleting cache file, etc.
Probably as a result of no longer keeping incorrect paths. Before, it would recalc the metadata once, correcting the paths in the process. Now it won't do the recalc.

Quote:
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.
Will look for it.
chaley is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

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


All times are GMT -4. The time now is 07:39 PM.


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