rschroll / beru

The Basic Epub Reader for Ubuntu
http://rschroll.github.io/beru/
GNU General Public License v3.0
25 stars 12 forks source link

Beru doesn't find newly added Books #20

Closed popey closed 11 years ago

popey commented 11 years ago

I already grabbed 3 books from online sources directly on the device. This all works fine.

I then used adb shell and scp to copy some more epubs over from my desktop. These ones do not show up in Beru, (but the original 3 do) and I can see no way in the UI to force Beru to refresh what it's found.

popey commented 11 years ago

phablet@ubuntu-phablet:~/Books$ ls -l *.epub | wc -l 5

http://popey.com/~alan/device-2013-09-16-012152.png

rschroll commented 11 years ago

Which version are you using? Starting in 0.9.1, books are stored in ~/.local/share/com.ubuntu.developer.rschroll.beru/Books, to comply with app store restrictions. Your old books in ~/Books are still in the database, but you won't be able to read them (at least if running under app armor restrictions).

Note that these versions are not in master yet; I'm holding them in a separate branch (restricted) while I consider the way forward.

That said, there is no way to force Beru to rescan while it's running.
(It should rescan on each restart.) My thinking was that Beru would be closed whenever the user added more books, but I don't actually know that that's the case. If you're scp-ing things over, it may not be.
It'd be relatively easy to add an update button to the toolbar.

Or maybe Beru should be watching for changes to the directory and update itself whenever there's a file added. I don't know if we can do that through the FolderListModel, but we're barely using that anymore.
Maybe it's time to roll our own directory lister.

popey commented 11 years ago

Doh! My bad. I had put books in ~/Books and after I filed this and went to bed I realised it was just looking in a different place, sorry.

rschroll commented 11 years ago

The issue of refreshing the list of books at times other than startup is still interesting, so I've made it issue #21.