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

Go Back   MobileRead Forums > E-Book Readers > Kobo Reader > Kobo Developer's Corner

Notices

Reply
 
Thread Tools Search this Thread
Old 08-22-2012, 12:16 AM   #1
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: 6,090
Karma: 6238033
Join Date: Jul 2011
Location: Sydney, Australia
Device: Kobo Touch, Kobo Glo
Shelf names

I would like some information from someone with a Touch running firmware 2.0.0 or later that is setup to use a language other than English.

In the SQLite database on the Touch, there is table called "Shelf". This holds a row for each shelf that you create. It also holds a row for the "Shortlist" and the "Wishlist". In fact, in the database, these are in no way different to any other shelf.

What I am interested in, is what values are in two of the columns for these shelves. The table has two name columns. One is "InternalName" and the other "Name". In the English version, these columns hold the same value for all shelves. This is the name you entered when creating the shelf. So, for the "Shortlist" shelf, both are set to "Shortlist".

What I would like to know, is if this is different in other languages. I know how I would have done it, but I am curious to see how Kobo did.

So, what I would like, is for someone running a non-English Touch with firmware 2.0.0 or later, to add a book or two to the Shortlist and Wishlist. Then have a look in the database on the Touch and report the values. Giving me a copy of the database after adding the books would also be handy, but I can understand if people don't want to do that.

Thanks for any help.
davidfor is offline   Reply With Quote
Old 08-22-2012, 09:26 AM   #2
leezer3
Member
leezer3 began at the beginning.
 
Posts: 22
Karma: 10
Join Date: Aug 2012
Device: Kobo Touch
Unless they've done something very, very funky with their SQL implementation, I'd expect the two to be identical, unless you choose to use unicode characters in the shelf name.

My Touch is in English, so I'm not going to try anything directly, but I suspect that if you use unicode (Chinese, Japanese, Greek & possibly accented characters) in your names, the two will differ
leezer3 is offline   Reply With Quote
Old 08-22-2012, 11:06 AM   #3
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: 6,090
Karma: 6238033
Join Date: Jul 2011
Location: Sydney, Australia
Device: Kobo Touch, Kobo Glo
But, if they are identical, why have them?

I hadn't thought about unicode. I was more thinking that for the Shortlist and Wishlist, that one would be the local word and used for display. The other would be the same every where used for linking in the database or other code. There isn't anything else that differentiates these shelves from the others.
davidfor is offline   Reply With Quote
Old 08-22-2012, 11:52 AM   #4
murg
No Comment
murg ought to be getting tired of karma fortunes by now.murg ought to be getting tired of karma fortunes by now.murg ought to be getting tired of karma fortunes by now.murg ought to be getting tired of karma fortunes by now.murg ought to be getting tired of karma fortunes by now.murg ought to be getting tired of karma fortunes by now.murg ought to be getting tired of karma fortunes by now.murg ought to be getting tired of karma fortunes by now.murg ought to be getting tired of karma fortunes by now.murg ought to be getting tired of karma fortunes by now.murg ought to be getting tired of karma fortunes by now.
 
Posts: 1,541
Karma: 3856214
Join Date: Jan 2012
Location: Australia
Device: Kobo: Not just an eReader, it's an adventure!
Quote:
Originally Posted by davidfor View Post
But, if they are identical, why have them?
There is a fair bit of duplication and inefficiency on the Kobo Touch database.

It's possible that there may be some past or future need for the two fields.
murg is offline   Reply With Quote
Old 08-22-2012, 07:09 PM   #5
leezer3
Member
leezer3 began at the beginning.
 
Posts: 22
Karma: 10
Join Date: Aug 2012
Device: Kobo Touch
Quote:
Originally Posted by davidfor View Post
But, if they are identical, why have them?

I hadn't thought about unicode. I was more thinking that for the Shortlist and Wishlist, that one would be the local word and used for display. The other would be the same every where used for linking in the database or other code. There isn't anything else that differentiates these shelves from the others.
Basically, searching for a unicode string requires a different SQL setup and query to a non-unicode string
Lazy SQL programming (Or outdated toolsets) basically means that you only implement the non-unicode search method, and pull the 'real' unicode string from a separate field.
leezer3 is offline   Reply With Quote
Old 08-22-2012, 08:58 PM   #6
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: 6,090
Karma: 6238033
Join Date: Jul 2011
Location: Sydney, Australia
Device: Kobo Touch, Kobo Glo
Quote:
Originally Posted by leezer3 View Post
Basically, searching for a unicode string requires a different SQL setup and query to a non-unicode string
Lazy SQL programming (Or outdated toolsets) basically means that you only implement the non-unicode search method, and pull the 'real' unicode string from a separate field.
True, but the way the columns are used makes me question this.

As I said, there are two name columns in the table Shelf: InternalName and Name. In the ShelfContent table, there is column ShelfName.

If you add a shelf, a row gets inserted with the two names the same. If you put a book on a shelf, a row for that book with the shelf name gets created. When I first looked at this, I assumed the join was Shelf.InternalName with ShelfContent.Name. But in my experiments, I have change the value of both InternalName and Name. The changes to InternalName didn't affect anything. Changing Name changed the name that was displayed on the shelf list. And it broke the link to the ShelfContents. No books where shown on the list.

I'm beginning to suspect that murg is right and that it is a leftover from an earlier design. But maybe I'll be optimistic and say that it is planning for a future super-duper enhancement.

And there is a reason for this beyond idle curiosity.
davidfor is offline   Reply With Quote
Old 08-23-2012, 12:03 AM   #7
PeterT
Taking a break; Fed up
PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.
 
PeterT's Avatar
 
Posts: 7,371
Karma: 46288753
Join Date: Nov 2007
Location: Toronto
Device: Wife: Touch, Arc, Vox Me: Nexus 7, Glo
When I finish the book I am on I will do a reset and change languages and see what changes.
PeterT is offline   Reply With Quote
Old 08-23-2012, 01:42 AM   #8
PeterT
Taking a break; Fed up
PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.
 
PeterT's Avatar
 
Posts: 7,371
Karma: 46288753
Join Date: Nov 2007
Location: Toronto
Device: Wife: Touch, Arc, Vox Me: Nexus 7, Glo
I tried a factory reset (back to 1.9.6) then did setup; was not able to change language until after the setup was complete (and the upgrade done to 2.0.0 R41166, 12.07.12).

Picked German and then added a book to the Shortlist.

Shelf name still shows as Shortlist.

DB Dump shows
Code:
INSERT INTO "Shelf" VALUES('2012-06-28T04:42:23Z','051b207e-882b-49eb-829a-a6e6bc80f6eb','Wishlist','2012-08-06T04:18:43Z','Wishlist','Custom','false','true','t
rue');
INSERT INTO "Shelf" VALUES('2012-08-23T04:10:21Z',NULL,'Shortlist','2012-08-23T04:10:21Z','Shortlist',NULL,'false','true','false');
PeterT is offline   Reply With Quote
Old 08-23-2012, 01:58 AM   #9
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: 6,090
Karma: 6238033
Join Date: Jul 2011
Location: Sydney, Australia
Device: Kobo Touch, Kobo Glo
That was quick reading. Or was it a short book?

While I was waiting I did try changing the language to French in the settings. It still used "Shortlist" for the shelf and in the database. But adding a book to the shortlist displayed a message in French.

That makes it look like they are handling the names in code.
davidfor is offline   Reply With Quote
Old 08-23-2012, 02:12 AM   #10
PeterT
Taking a break; Fed up
PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.
 
PeterT's Avatar
 
Posts: 7,371
Karma: 46288753
Join Date: Nov 2007
Location: Toronto
Device: Wife: Touch, Arc, Vox Me: Nexus 7, Glo
I was about 1/2 through the book so just power read... and phew.... this time was still within the ADE device limit count
PeterT is offline   Reply With Quote
Old 08-26-2012, 05:45 AM   #11
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: 6,090
Karma: 6238033
Join Date: Jul 2011
Location: Sydney, Australia
Device: Kobo Touch, Kobo Glo
Well, I stumbled on a problem last night if the InternalName and the Name is different for a shelf. You can't delete it. Matched them up again, and they deleted with no problems
davidfor 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
Looking for an app with custom shelf view jabberwock_11 Android Devices 5 08-20-2012 12:46 AM
Library Shelf Bronwyn Kobo Reader 1 07-31-2012 01:01 AM
Can I change the shelf color? wvcherrybomb Kindle Fire 4 02-22-2012 12:49 PM
Been on the shelf for awhile so..... d.culloch Introduce Yourself 2 10-09-2008 12:33 PM
1 Shelf Clear, Many to Go RWood Lounge 29 12-04-2007 11:44 AM


All times are GMT -4. The time now is 07:43 PM.


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