Quote:
Originally Posted by Josieb1
I don't have a backup (or a red snapper) and as much as i'd love to make one, once my kobo is back to normal, I don't quite understand your instructions. Sorry once you talk in techie code language my brain sort of freezes over 
|
Okay, lemme try more of a "do this, do that" approach...
I'm assuming here that you want to repair the shelves instead of just deleting them and starting over. I'm also assuming that when the dust clears, you want one shelf representing each set of duplicates, and that shelf should contain everything that was on any of its duplicates. That is, if you have five "Freebie" shelves, you want to end up with one that has all the books that are on any "Freebie" shelf, and so on.
TOOLS:
I use an add-on for Firefox called "
SQLite Manager" - grab that and you're most of the way there. Once you have that installed, connect your reader to your PC, go to your reader's .kobo folder, and make a backup copy of KoboReader.sqlite. Now start the SQLite Manager add-on and open .kobo/KoboReader.sqlite with SM.
PROCESS:
In the left panel, you should see a few options, starting with "Master Table". Right under that, there's a "Tables" entry that, on my machine, shows 26 entries inside it. Click the little triangle beside "Tables (26)" to open it, and scroll down to the one that says "Shelf". Click on the word.
The main part of the window should now show all the shelves/collections on your device. The sixth column, "Name", should look very familiar, but the fourth column, labeled "InternalName", is more important. Click on that header, and it'll sort the shelves by name - very useful for finding duplicates, which is where your problems are coming from. As you scan over the list, you should see groups of duplicated shelves with different ID values but the same Name (and, perhaps, InternalName). If they don't have different IDs, we're in trouble and you should
stop now (while you haven't changed anything) and let me know that. Otherwise, assuming all the ID values are different, we're in good shape; continue below.
First, we need to make sure all our changes are going to be sent to the server when you sync. Click on the "Execute SQL" tab and paste the following line into the white box:
UPDATE "main"."Shelf" SET "_IsDeleted" = "true", "_IsSynced" = "false"
Click the "Run SQL" button, and you should get a "no errors" message in the "Last Error" box. That's good. What you've just done is told your device to get rid of all your shelves, so you shouldn't stop there! You still have some work to do. Click back on "Browse & Search" and click "Name" to sort everything.
Now you have to fix that "same name" problem and tell the device NOT to delete the shelves you want to keep. It's tedious, and it means editing every row, but it has to be done, since it's the only way to separate the shelves. What I did was add a number to the end of each duplicate's Name and InternalName.
Double-click on a row and it'll bring up an "Edit Record" box. If it's a shelf you're renaming, edit fields 3 and 5 (InternalName and Name) so they match each other, but no other row. For instance, if you have four "Pending" shelves, leave one alone for now and change the rest to "Pending1" through "Pending3" so you can tell them apart. That way, you're keeping one "real" shelf from each set. On the one you
don't rename, edit field 7 (_IsDeleted) to say "false". On each row, when you're done with your edits, click OK and confirm the change. The plugin should then tell you to click on Cancel to exit the box.
You may have to visit multiple pages, since the utility only shows 100 rows at a time. The bottom line under this big area handles that; it'll say something like "1 - 100 of 260" with arrows and double-arrows around it. The single-arrow advances to the next page; the double-arrow zips to the end.
Once you're done with those changes, go to Database at the top left, then click Close Database in that menu. (It saves automatically as you work.) Close SM, make a new backup of the changed file, disconnect the reader, and open up your collections view. Poke around a bit to make sure everything looks like you want. (All the "numbered" shelves should now contain zero books, if they're even visible, and the "not-numbered" ones should contain everything they're supposed to.) If that looks good, go ahead and sync. That should remove all the duplicated shelves from the cloud and update the shelves you're keeping, since we've told the device that all the shelves need to be updated.
Is that clearer, maybe?