10-13-2011, 11:58 PM | #1 |
<Insert Wit Here>
Posts: 1,017
Karma: 1275899
Join Date: Jan 2008
Location: Puget Sound
Device: Kindle Oasis, Kobo Forma
|
Recently Opened on Homescreen Hack for T1
So, I've been spoiled by PRS+ on my 950 letting me show the most recently opened books on the home screen. I wanted something similar on my T1 when I suddenly had some inspiration on how it can be done: SQL Triggers!
A little bit of time, and now I have my home screen behaving differently. Instead of just the recently added books there, it also includes recently opened books. So even when I download a new book, it will also display, making it quite handy. The following SQL code needs to be run against books.db on both internal memory, and the micro-SD card (if you have one). How to run it is unfortunately left up to the reader at this point. You will need some sort of SQLite client that lets you run SQL queries directly (like MesaSQLite on OS X). Not entirely user-friendly, but for those who with a bit of know-how, it's been working fine for me on the stock firmware. Code:
CREATE TRIGGER recently_opened_trigger AFTER UPDATE OF reading_time ON books BEGIN UPDATE books SET added_date = 0 WHERE _id = new._id; UPDATE books SET added_date = reading_time WHERE reading_time NOT NULL AND _id <> new._id; END
I guess the upside to SQLite being used is that we can actually create SQL triggers to customize the behavior a little here and there. Within some limits anyhow. |
10-14-2011, 06:32 AM | #2 |
Junior Member
Posts: 2
Karma: 10
Join Date: Oct 2011
Device: Sony PRS T1
|
Hi Kolenka,
I found it really annoying how it listed recently added rather than recently read/opened Your code worked like a charm, thanks! |
Advert | |
|
10-14-2011, 09:34 AM | #3 |
...
Posts: 226
Karma: 514506
Join Date: Sep 2011
Device: Sony PRS-T1
|
Nice work Kolenka, thanks for sharing!
Will definitely set this up on my books db, I also would rather have recently opened show up there. |
10-14-2011, 10:48 AM | #4 |
<Insert Wit Here>
Posts: 1,017
Karma: 1275899
Join Date: Jan 2008
Location: Puget Sound
Device: Kindle Oasis, Kobo Forma
|
As written, recently added still appears there too. It will take a second trigger to block it.
|
10-14-2011, 02:01 PM | #5 |
...
Posts: 226
Karma: 514506
Join Date: Sep 2011
Device: Sony PRS-T1
|
I understand, but my response was not clear, sorry.
I like that this will not interfere with built in operation. Clever idea using the trigger for this, got me thinking of other possibilities now, thanks again. |
Advert | |
|
10-14-2011, 02:03 PM | #6 |
<Insert Wit Here>
Posts: 1,017
Karma: 1275899
Join Date: Jan 2008
Location: Puget Sound
Device: Kindle Oasis, Kobo Forma
|
I'm honestly surprised the T1 doesn't occasionally scrub the DB to make sure only their triggers are present. It seems like a way to completely destabilize or break the device in some ways.
That said, perhaps they saw that this was a case of users only really being able to hang themselves, and only until they formatted memory or deleted books.db, and just thought it wasn't worth the effort to lock this down. |
10-14-2011, 08:18 PM | #7 |
...
Posts: 226
Karma: 514506
Join Date: Sep 2011
Device: Sony PRS-T1
|
Guess they figure users must know what they're doing if they update database so it's ok
Tried it out, works exactly as you described, very nice enhancement |
10-19-2011, 08:55 AM | #8 |
Grand Sorcerer
Posts: 6,216
Karma: 16534894
Join Date: Sep 2009
Location: UK
Device: Kobo: KA1, ClaraHD, Forma, Libra2, Clara2E. PocketBook: TouchHD3
|
Just a note to any Windows user interested in this hack...
I am using Windows XP SP3 and I was able to add the necessary trigger very easily using the free program SQLiteSpy. I can post a more detailed step-by-step if anyone needs it. Last edited by jackie_w; 10-19-2011 at 08:58 AM. |
10-20-2011, 11:39 PM | #9 |
Groupie
Posts: 167
Karma: 2627964
Join Date: Aug 2010
Location: Alabama, USA
Device: Kobo Libra 2, Kobo Clara 2e, Kobo Libra Colour, Kindle Paperwhite
|
|
10-21-2011, 03:39 AM | #10 |
Grand Sorcerer
Posts: 6,332
Karma: 12117215
Join Date: Jun 2009
Location: Madrid, Spain
Device: Kobo Clara/Aura One/Forma,XiaoMI 5, iPad, Huawei MediaPad, YotaPhone 2
|
Thank you about the trigger and the program for windows
Nice trigger, BTW |
10-21-2011, 09:30 AM | #11 |
Grand Sorcerer
Posts: 6,216
Karma: 16534894
Join Date: Sep 2009
Location: UK
Device: Kobo: KA1, ClaraHD, Forma, Libra2, Clara2E. PocketBook: TouchHD3
|
Detaile step-by-step for Windows
As requested, this is how I applied the hack on my Windows XP PC.
Last edited by jackie_w; 10-25-2011 at 05:31 PM. Reason: typo |
10-21-2011, 01:50 PM | #12 |
<Insert Wit Here>
Posts: 1,017
Karma: 1275899
Join Date: Jan 2008
Location: Puget Sound
Device: Kindle Oasis, Kobo Forma
|
Just note that if you have an SD card in your T1, you will need to do this on the SD card as well.
|
10-22-2011, 12:50 AM | #13 |
Groupie
Posts: 167
Karma: 2627964
Join Date: Aug 2010
Location: Alabama, USA
Device: Kobo Libra 2, Kobo Clara 2e, Kobo Libra Colour, Kindle Paperwhite
|
|
10-24-2011, 04:47 PM | #14 |
Zealot
Posts: 100
Karma: 2092
Join Date: Sep 2011
Location: UK
Device: Kobo Sage, iPad
|
Would those instructions work (more or less) on a Mac? I'm a complete SQL novice - but I assume there must be some similar software out there?
I love my new reader (the first I've had), but it's a pain if you pop out of the book you're reading to have a quick look at a different one, then have to go through five pages of clunky navigation to dig it out again! |
10-24-2011, 05:01 PM | #15 | |
<Insert Wit Here>
Posts: 1,017
Karma: 1275899
Join Date: Jan 2008
Location: Puget Sound
Device: Kindle Oasis, Kobo Forma
|
Quote:
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Accessing the most recently opened ebooks | africalass | Library Management | 11 | 04-03-2011 04:14 AM |
Sideloaded book on homescreen solution for Rooted NC | mad5427 | Nook Developer's Corner | 17 | 03-14-2011 08:20 AM |
I don't know what to put on my homescreen. | SCION | Nook Developer's Corner | 3 | 01-16-2011 01:09 AM |
Content PDF: Homescreen shows Filename instead of Title (Metadata) | bear4hunter | Amazon Kindle | 1 | 08-02-2010 12:35 AM |
Feature request: show recently opened e-books | yegorich | Calibre | 1 | 01-18-2010 11:35 AM |