babluboy / bookworm

A simple ebook reader for Elementary OS
GNU General Public License v3.0
1.32k stars 101 forks source link

somes titles shown incorrectly as "Unknown Book" #301

Closed brainchild0 closed 4 years ago

brainchild0 commented 4 years ago

Some books appear titled "Unknown Book" in reading mode, though their title is correctly determined in the library.

Unfortunately, I currently cannot reproduce without sharing copyrighted material.

Have other users observed this behavior?


Bookworm 1.1.2 Linux Mint 19.2

babluboy commented 4 years ago

Thanks for raising this issue. Would have been good to get some test data to fix the issue. I’m guessing that the title is not being determined by the code (hence coming up in reading view as Unknown) and the fall back of using the ebook file name as title in library view is what you are seeing. Maybe I should use the same fallback in the reading view.

You can test this by changing the ebook file name and adding to bookworm to see if I’m guessing this correctly. Also if you can unzip (if it’s a epub) the ebook and attach the metadata files like .opf and .manifest

brainchild0 commented 4 years ago

I am having trouble isolating. Actually, I am noticing that the library generally is corrupted. Many items are duplicated, others displayed as "Unknown Book" with missing cover art. The above report may be simply a special case of a broader problem, but again I have been unable to isolate.

babluboy commented 4 years ago

Found a bug in the code where the fallback step of setting the title from the name of the ebook file was not correct. Hopefully this fix will address the issue.

Will be great if you can build from source and remove/re-add a book with this issue to check if the bug is gone.

brainchild0 commented 4 years ago

Can the app be built for running in place, as to not be installed over the system copy from the distribution? I tried omitting the prefix, but when I try to run the built target, I get the following:

$ cd build
$ ./com.github.babluboy.bookworm
** (process:18788): DEBUG: 06:39:39.413: bookworm.vala:128: Bookworm Install Directory: /usr/local/share
** (process:18788): DEBUG: 06:39:39.414: bookworm.vala:129: Bookworm Install Tasks Scripts Directory: /usr/local/share/com.github.babluboy.bookworm/scripts/tasks
** (process:18788): DEBUG: 06:39:39.414: bookworm.vala:130: Bookworm Install Mobi Scripts Directory: /usr/local/share/com.github.babluboy.bookworm/scripts/mobi_lib
** (process:18788): DEBUG: 06:39:39.414: bookworm.vala:131: Bookworm User Data Directory: /home/epl/.local/share/com.github.babluboy.bookworm
Gtk-Message: 06:39:39.414: Failed to load module "appmenu-gtk-module"

(com.github.babluboy.bookworm:18788): dbind-WARNING **: 06:39:39.423: Couldn't register with accessibility bus: Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the network connection was broken.
(com.github.babluboy.bookworm:18788): Gtk-DEBUG: 06:39:39.486: Connecting to session manager
[ERROR 06:39:39.492182] [GLib-GIO] Settings schema 'com.github.babluboy.bookworm.shortcuts' is not installed
Trace/breakpoint trap (core dumped)
babluboy commented 4 years ago

Did you change the prefix in the meson build command below to some other directory i.e. ~/bookworm_new ? meson build --prefix=/usr

git clone https://github.com/babluboy/bookworm.git
cd bookworm
mkdir -p build && cd build
ninja
sudo ninja install
com.github.babluboy.bookworm --debug

Ideally it should install everything to that location, but not very sure if there will be cross ref. to the older version.

You can also install to the regular /usr and if there is anything which the new version breaks, you can remove and revert back the older version? You existing library should be picked up with the new code. You can take a back up from ~/.local/share/com.github.babluboy.bookworm before installing the new code.

However, if you don't want to risk it, then I suggest you can wait for the new version to be released and try test this issue with the same ebooks.

babluboy commented 4 years ago

On second thoughts, an existing library will not get the fix as the books already have the wrong title - its only when a book is added to the library the fix will effect the actual title to be picked up

brainchild0 commented 4 years ago

I would like to run in place, rather than installing on the system, which already has an installation of a stable release through the system package manager.