View Single Post
Old 01-03-2010, 05:54 PM   #5
hakan42
Zealot
hakan42 is on a distinguished road
 
hakan42's Avatar
 
Posts: 136
Karma: 60
Join Date: Jul 2009
Location: Munich, Germany
Device: Nook Classic rooted; Galaxy S IV with Aldiko, other older devices
Quote:
Originally Posted by kovidgoyal View Post
Hmm, it's a tough choice. Currently as far as I know, UUIDs are used in only two places (the OPDS feeds generated by the calibre content server and to set the identifier for a book when converting it to EPUB). This would break the second, but not catastrophically. On the other hand, altering the schema to add a remote_id column wont break anything catastrophically, since the only code that would depend on its existence would be the downloading code.

Looking at it from another angle, do you really need to put this info into the database? If instead it were stored in a config file as a list of previously downloaded urns, it would server the purpose of avoiding re-downloads. You can use the XMLConfig class to achieve this conveniently, it will automatically serialize a python dict.
I really would like to identify a previously downloaded book with only the information in the database. Keeping another file somewhere is a sure recipe to have end users somehow lose it and afterwards to complain that calibre is broken because it re-downloads everything again and again... yadda yadda yadda... better keep everything in one place.

I think I saw somewhere in the code (aaah, in database2.py) how you update schemas. If you don't mind, I would add a remote_id column. This should minimize the impact on other code...

Quote:
Originally Posted by kovidgoyal View Post
If you do intend to do a browser eventually, let me know as I'd like to abstract its design to support sources of books that dont export OPDS feeds, like MobileRead.
Actually, I would very much like a browser, but my python skills are not up to date yet. The last time I built anything big in python was two years ago.

I think a browser would be most useful for webscription too. Thy expose only the epub files via ODPS, but you can download all the other formates from the HTML web pages. Call me a digital packrat, but I'd like to mirror all possible formats if available

Regards,
Hakan
hakan42 is offline   Reply With Quote