Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Readers > Kobo Reader

Notices

Reply
 
Thread Tools Search this Thread
Old 11-09-2016, 07:50 PM   #16
davidfor
Grand Sorcerer
davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.
 
Posts: 24,905
Karma: 47303824
Join Date: Jul 2011
Location: Sydney, Australia
Device: Kobo:Touch,Glo, AuraH2O, GloHD,AuraONE, ClaraHD, Libra H2O; tolinoepos
Quote:
Originally Posted by Stevex View Post
If anyone is still interested I posted this before in Series Order thread but again here.

If you don't mind to lose the "recently read" sort order (which I have personally exactly zero use for)
Just to be clear, there isn't a "recently read" sort order. The "Recent" order is based on the last read date AND the added to the device date. From testing ages ago, if the last read date is null, then it uses the added date. But, it might have changed to use the maximum of these two dates.

Personally, the "Recent" order is the one I use most. If I am looking for a book to read, I use the "Unread" filter with "Recent" sort as that shows the books I have added most recently. Then I scroll until something catches my eye. And "Recent" works best when I am looking through books I have started but for some reason stopped reading for a while or when I open books for testing something and push the real current read off the home screen.
Quote:
you can use this for series order instead by adding the following stored procedures.
The pedant in me has to point out that these are "triggers" not "stored procedures".
Quote:
(The reason for *10 is that I have a few 1.5, 1.7 and suchlike, if you have 1.66 you can always make times and divide by 100 or whatever)

I have to say, it's actually brilliant to see my collections come up spontaneously in the right order without having to mangle titles and suchlike.

One caveat: If you read a book, this will of course become out of order till you restart the machine or similar.

CREATE TRIGGER Activity_Reset_Collection_1 AFTER INSERT ON Activity BEGIN UPDATE Content SET DateLastRead = date((julianday('Now')*10-SeriesNumber*10)/10) WHERE SeriesNumber not null and ContentType=6; END

CREATE TRIGGER Activity_Reset_Collection_2 AFTER UPDATE ON Activity BEGIN UPDATE Content SET DateLastRead = date((julianday('Now')*10-SeriesNumber*10)/10) WHERE SeriesNumber not null and ContentType=6; END
Wow, that seems like over kill. Every single time a tile is changed on the home screen, you are updating the last date read for all books that have a series number. For me, that's currently 1091 books. Why don't you put the triggers on the content table? You can choose some constant initial date for the calculation and redo the calculation just for the book that is being updated. And even if you trigger it from the Activity table, you will have the content id of the book being updated, so should be able to do the update just for that book.

Changing the date read like this will probably cause problems for syncing any purchased books. I'm guessing you don't do that, but it is a caution for anyone who does.
davidfor is offline   Reply With Quote
Old 11-10-2016, 04:04 PM   #17
Stevex
Addict
Stevex is as sexy as a twisted cruller doughtnut.Stevex is as sexy as a twisted cruller doughtnut.Stevex is as sexy as a twisted cruller doughtnut.Stevex is as sexy as a twisted cruller doughtnut.Stevex is as sexy as a twisted cruller doughtnut.Stevex is as sexy as a twisted cruller doughtnut.Stevex is as sexy as a twisted cruller doughtnut.Stevex is as sexy as a twisted cruller doughtnut.Stevex is as sexy as a twisted cruller doughtnut.Stevex is as sexy as a twisted cruller doughtnut.Stevex is as sexy as a twisted cruller doughtnut.
 
Posts: 225
Karma: 15318
Join Date: Nov 2015
Device: Kobo Glo HD
(1) arrgh you are right it's a trigger not an sp embarrassing
(2) I also have 000's of books on the device but it doesn't have any noticeable performance effect whatever*. I know what you mean about overkill but I just wanted to be sure it runs and the tile thing is guaranteed updated.
(3) I can think of quite a few improvements, and in fact last night I just did one last night after I posted because it was in my head, but it's just not worth it to beautify it much the thing is simple took me about a minute to do and works
(4) you are right I don't have any purchased books only sideloads but I don't -think- pushing dateread into the past (which is all this does) would impact anything?

* PS: To me, on my aura glo hd, in my use case, caveat caveat etc etc ;-)

PPS It's an easy thing to try, it's brilliant for me, and for anyone else who wants to try it it's at the worst a bit of fun really as long as you back the db up first

Last edited by Stevex; 11-10-2016 at 04:09 PM.
Stevex is offline   Reply With Quote
Advert
Old 11-10-2016, 06:17 PM   #18
davidfor
Grand Sorcerer
davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.
 
Posts: 24,905
Karma: 47303824
Join Date: Jul 2011
Location: Sydney, Australia
Device: Kobo:Touch,Glo, AuraH2O, GloHD,AuraONE, ClaraHD, Libra H2O; tolinoepos
Quote:
Originally Posted by Stevex View Post
(1) arrgh you are right it's a trigger not an sp embarrassing
(2) I also have 000's of books on the device but it doesn't have any noticeable performance effect whatever*. I know what you mean about overkill but I just wanted to be sure it runs and the tile thing is guaranteed updated.
If it performing OK, then good. But, updating a lot of extra rows when not needed is something I really try to avoid.
Quote:
(3) I can think of quite a few improvements, and in fact last night I just did one last night after I posted because it was in my head, but it's just not worth it to beautify it much the thing is simple took me about a minute to do and works
(4) you are right I don't have any purchased books only sideloads but I don't -think- pushing dateread into the past (which is all this does) would impact anything?
I didn't think it through yesterday, it just gave me an uncomfortable feeling.

The main affect will be for people using multiple devices or the apps. When you open a purchased book, it contacts the server to get the latest reading position. If you have been reading on another device, you get a prompt to ask if you want to go to the new position. The check is based on the timestamp, not the actual position in the book. And if a sync is done, the position from the later timestamp is taken without any prompts.

And I think it will mean a sync takes a lot longer. Every purchased book with a series number will trigger a change when they haven't really changed.

And of course, for anyone who is using my Kobo Utilities to store the reading status, there are going to be some consequences.
Quote:

* PS: To me, on my aura glo hd, in my use case, caveat caveat etc etc ;-)

PPS It's an easy thing to try, it's brilliant for me, and for anyone else who wants to try it it's at the worst a bit of fun really as long as you back the db up first
Yes, everyone, back up your databases before messing with them.
davidfor is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Kobo Aura - Sort by Series on device Nicolafred Library Management 26 04-06-2016 04:53 PM
Sort series on Kobo Aura H2O sebastian Kobo Reader 2 11-18-2014 06:57 PM
Sort collection by series number? rp272 Plugins 2 08-05-2011 01:50 AM
Is there a way to make a collection in the kindle sort by series #? havenw Amazon Kindle 4 12-30-2010 03:44 PM


All times are GMT -4. The time now is 12:56 PM.


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