View Single Post
Old 02-01-2017, 03:22 PM   #35
kido.resuri
Groupie
kido.resuri has a spectacular aura aboutkido.resuri has a spectacular aura aboutkido.resuri has a spectacular aura aboutkido.resuri has a spectacular aura aboutkido.resuri has a spectacular aura aboutkido.resuri has a spectacular aura aboutkido.resuri has a spectacular aura aboutkido.resuri has a spectacular aura aboutkido.resuri has a spectacular aura aboutkido.resuri has a spectacular aura aboutkido.resuri has a spectacular aura about
 
Posts: 172
Karma: 4282
Join Date: Dec 2016
Location: Hungary
Device: Kobo Aura H2O
What if you mount /mnt/onboad/.mysd to /mnt/sd/virtual, then after nickel does the content update, you execute this sql query:

Code:
UPDATE content SET ContentID = REPLACE(ContentID,'/mnt/sd/virtual/','/mnt/onboard/.mysd/'), BookID = REPLACE(BookID,'/mnt/sd/virtual/','/mnt/onboard/.mysd/');
UPDATE Activity SET Id = REPLACE(Id,'/mnt/sd/virtual/','/mnt/onboard/.mysd/');
DELETE FROM Activity WHERE Id LIKE '%/mnt/sd/virtual/%';

I tried, but edited the database offline, then copied back over ftp, rebooted, and it works. So it should work on Kobo itself with a script.

EDIT: I tried the query on the Kobo itself, and it works. nickel needs a restart tho to see the changes. It would be good to detect when nickel finishes the content update from the virtual sd, so we could execute a script with the query and make a restart. Maybe it's not a real good idea, because every time it gets mounted, the old files are updated to, so it would be a better idea to move the content already read by nickel to another subdir. Makes it too complicated and vulnerable maybe.

Last edited by kido.resuri; 02-01-2017 at 03:42 PM. Reason: added some comments after testing
kido.resuri is offline   Reply With Quote