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

Go Back   MobileRead Forums > E-Book Readers > More E-Book Readers > iRex

Notices

Reply
 
Thread Tools Search this Thread
Old 04-09-2010, 02:25 PM   #1
Mr. X
Connoisseur
Mr. X is on a distinguished road
 
Posts: 68
Karma: 64
Join Date: Mar 2010
Location: Philadelphia
Device: iRex DR800SG
updating metadata externally

Is there anything that holds global.db and the various metadata.db databases open while the DR is in USB client mode connected to a PC? I'm thinking the Calibre plugin could be customized to use sqlite to provide the metadata when copying books over, cutting down on indexing time and allowing higher quality metadata (e.g. the image the user provided as the cover not the first page of the document).
Mr. X is offline   Reply With Quote
Old 04-09-2010, 03:49 PM   #2
Mr. X
Connoisseur
Mr. X is on a distinguished road
 
Posts: 68
Karma: 64
Join Date: Mar 2010
Location: Philadelphia
Device: iRex DR800SG
Alternatively, is OPF file parsing on the timeline for future enhancements? Calibre can also output the book, a cover jpg, and a opf metadata file that would be much faster to parse when available...
Mr. X is offline   Reply With Quote
 
Enthusiast
Old 04-09-2010, 04:02 PM   #3
Gertjan
IRX developer
Gertjan doesn't litterGertjan doesn't litterGertjan doesn't litter
 
Gertjan's Avatar
 
Posts: 158
Karma: 224
Join Date: Oct 2008
Device: Irex DR800S, DR1000S, iLiad
Quote:
Originally Posted by Mr. X View Post
Is there anything that holds global.db and the various metadata.db databases open while the DR is in USB client mode connected to a PC?
Certainly not. The SD card is unmounted from the devices OS before it is exported over USB so applications on the PC are free to access and alter the databases. This is what the (now defunct) Windows Companion software did for moving files and folders to retain annotation. Of course, the stability of the device can be affected by errors made in external applications.
Gertjan is offline   Reply With Quote
Old 04-09-2010, 04:12 PM   #4
Shaggy
Wizard
Shaggy ought to be getting tired of karma fortunes by now.Shaggy ought to be getting tired of karma fortunes by now.Shaggy ought to be getting tired of karma fortunes by now.Shaggy ought to be getting tired of karma fortunes by now.Shaggy ought to be getting tired of karma fortunes by now.Shaggy ought to be getting tired of karma fortunes by now.Shaggy ought to be getting tired of karma fortunes by now.Shaggy ought to be getting tired of karma fortunes by now.Shaggy ought to be getting tired of karma fortunes by now.Shaggy ought to be getting tired of karma fortunes by now.Shaggy ought to be getting tired of karma fortunes by now.
 
Shaggy's Avatar
 
Posts: 4,293
Karma: 529619
Join Date: May 2007
Device: iRex iLiad, DR800SG
Yeah, I think this goes back to even the iLiad days where you had to be in the Content Lister in order to connect to the PC, you couldn't have a document open. The general idea is that you don't want to let the device and the PC have access to the same data at the same time... bad things can happen. I'm pretty sure every firmware they've released since 2007 or so will make sure that the PC has exclusive access to any exported filesystem.

Last edited by Shaggy; 04-09-2010 at 04:24 PM.
Shaggy is offline   Reply With Quote
Old 04-09-2010, 05:37 PM   #5
Mr. X
Connoisseur
Mr. X is on a distinguished road
 
Posts: 68
Karma: 64
Join Date: Mar 2010
Location: Philadelphia
Device: iRex DR800SG
Quote:
Originally Posted by Gertjan View Post
Certainly not. The SD card is unmounted from the devices OS before it is exported over USB so applications on the PC are free to access and alter the databases. This is what the (now defunct) Windows Companion software did for moving files and folders to retain annotation. Of course, the stability of the device can be affected by errors made in external applications.
Cool. My plan was to wait for the updated libermetadb code to be posted (I see the schema version is 0.6 now) and steal most of the logic for touching the database out of there, just getting the values from calibre instead of scanning the card...
Mr. X is offline   Reply With Quote
Old 04-09-2010, 05:39 PM   #6
Mr. X
Connoisseur
Mr. X is on a distinguished road
 
Posts: 68
Karma: 64
Join Date: Mar 2010
Location: Philadelphia
Device: iRex DR800SG
Oh- one more question I had was if the thumbnail blob has to be a .png or if .jpg is also allowed?
Mr. X is offline   Reply With Quote
Old 04-10-2010, 05:02 AM   #7
Iņigo
Guru
Iņigo did not drink the Kool Aid.Iņigo did not drink the Kool Aid.Iņigo did not drink the Kool Aid.Iņigo did not drink the Kool Aid.Iņigo did not drink the Kool Aid.Iņigo did not drink the Kool Aid.Iņigo did not drink the Kool Aid.Iņigo did not drink the Kool Aid.Iņigo did not drink the Kool Aid.Iņigo did not drink the Kool Aid.Iņigo did not drink the Kool Aid.
 
Posts: 711
Karma: 72743
Join Date: Feb 2008
Location: Here or there
Device: iRex iLiad, in love with iRex DR800S. Also a K4NT. Now a Kobo Aura
Quote:
Originally Posted by Mr. X View Post
Oh- one more question I had was if the thumbnail blob has to be a .png or if .jpg is also allowed?
They are saved as png data.
You can select the data from thumbnails table and and just use or save as .png file, no need for any modification.

Code:
[inigo@inigo eReader]$ sqlite3 global.db
SQLite version 3.6.20
Enter ".help" for instructions
Enter SQL statements terminated with a ";"
sqlite> .schema thumbnails
CREATE TABLE thumbnails (
  file_id            INTEGER PRIMARY KEY NOT NULL,
  thumb_data_mini    BLOB,
  thumb_data_small   BLOB,
  thumb_data_medium  BLOB,
  thumb_data_large   BLOB
);
CREATE TRIGGER fki_thumbnails_file_id
BEFORE INSERT ON thumbnails
FOR EACH ROW BEGIN
	SELECT RAISE(ROLLBACK, 'insert on table "thumbnails" violates foreign key constraint "file_metadata" (file_id)') WHERE (SELECT file_id FROM file_metadata WHERE file_id = NEW.file_id) IS NULL;
END;
CREATE TRIGGER fku_thumbnails_file_id
BEFORE UPDATE ON thumbnails
FOR EACH ROW BEGIN
	SELECT RAISE(ROLLBACK, 'update on table "thumbnails" violates foreign key constraint "file_metadata" (file_id)') WHERE (SELECT file_id FROM file_metadata WHERE file_id = NEW.file_id) IS NULL;
END;
sqlite> select thumb_data_small from thumbnails where file_id == 2515;
�PNG


sqlite>
Iņigo


EDIT: ok, I'm reading carefully now... you asked if jpeg could be used besides png. Sorry.

Last edited by Iņigo; 04-10-2010 at 07:06 AM.
Iņigo is offline   Reply With Quote
Old 04-10-2010, 12:14 PM   #8
Mackx
Guru
Mackx is a splendid one to beholdMackx is a splendid one to beholdMackx is a splendid one to beholdMackx is a splendid one to beholdMackx is a splendid one to beholdMackx is a splendid one to beholdMackx is a splendid one to beholdMackx is a splendid one to beholdMackx is a splendid one to beholdMackx is a splendid one to beholdMackx is a splendid one to behold
 
Posts: 998
Karma: 19985
Join Date: Dec 2008
Location: Netherlands
Device: iRex DR1000S
Quote:
Originally Posted by Mr. X View Post
Oh- one more question I had was if the thumbnail blob has to be a .png or if .jpg is also allowed?
The code of the function get_thumbnail_from_data() in filemodel.c (DR800 firmware) suggests that only PNG is supported at this moment.
Mackx 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
Updating Metadata in Bulk Turt99 Calibre 5 06-07-2010 03:19 PM
Updating Metadata without and ISBN herbycanopy Calibre 7 05-22-2010 01:16 AM
Error on updating metadata in 0.6.44 jomaweb Calibre 3 03-06-2010 12:05 PM
Problem updating metadata (using mobi2mobi command line and gui) whitearrow Kindle Formats 3 12-05-2009 07:07 PM
Updating metadata on books already uploaded to the PRS700 dpayment Calibre 1 01-23-2009 01:11 PM


All times are GMT -4. The time now is 10:14 PM.


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