babluboy / bookworm

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

Alter the design to auto discover books #104

Closed unhammer closed 6 years ago

unhammer commented 7 years ago

I see bookworm installed a cronjob without notifying/asking me, which lead to 100 % cpu usage / battery drain for hours after I had closed the app and having to hunt through top to find the culprit.

It should definitely ask before changing crontab. (Also, it'd be nice if it could, as an alternative, only scan when open.)

babluboy commented 7 years ago

Good point. I was not aware that the cron can take 100% CPU and drain battery as its a fairly quick scan which runs once every couple of hours...probably I should throw in a preference option for this: 1- Run a scan every x hours (user can set the value of x) 2- Scan for books after bookworm is closed

The above will only be applicable if the user chooses to set a "watched folder" otherwise there is no scanning at all.

Does the above sound like a good design.

unhammer commented 7 years ago

Sounds great to me =D

(I think in my case it was subprocesses of pdftohtml running over a bunch of articles or something, and since it was my first time using bookwork it probably had a lot of work to do.)

babluboy commented 7 years ago

@unhammer Yes, the first time is always lot of work and the pdftohtml utility is a very slow process...I already have an issue raised to replace it with something better for PDF rendering...

babluboy commented 6 years ago

Thoughts on re-design: 1- Initiate a background process to start the discovery as soon as the user adds/changes a folder. Also show some indication to the user that discovery has been started 2- Initiate a process to check for new books every time bookworm starts

The above can replace the cron job for the auto discovery function.

babluboy commented 6 years ago

Altered the design to discover books for auto addition to the library by running a background task when Bookworm is closed. Also updated the dialog to show a Toast message for the same when a directory is added to the "watched list"

bookworm dialog toast