Ticket #892 (closed bug: fixed)

Opened 2 years ago

Last modified 18 months ago

Read "percents read" information from CoolReader

Reported by: avn Owned by: avn
Priority: normal Milestone: 0.3
Component: bookshelf (MadShelf) Version: post-0.2 snapshot
Keywords: azbooka6 Cc:
Blocked By: Blocking:

Description (last modified by avn) (diff)

Done, with caching, files reads on first access, and cache invalidates by history file touch. Now max(position) displayed (and it later can be changed w/o rewrite plugins)

Change History

comment:1 Changed 2 years ago by avn

  • Owner changed from dottedmag to avn

comment:2 Changed 2 years ago by dottedmag

  • Milestone changed from bluesky to 0.3

Madshelf's mechanism should be pluggable like libextractor one: applications should drop their plugins to /usr/lib/madshelf/<something>, and madshelf should ask the plugins for the "current position of the file".

Points to be considered:

  • Plugins should be stateful. It is wasteful to read .xml again and again, especially if there are lot of apps with "positions". It is much nicer to power consumption read state file once, set a inotify watch and then only reread it when it has changed and application requested position of some file.
  • Another use of statefulness is caching. FBReader stores current positions in XML, so it is wasteful to read it looking for specific file and discarding all other files' info.
  • Plugins should filter out files aggressively. It makes no sense to check current position of pdf file in FBreader. In order to achieve it plugins should declare MIME-types their applications support. The best way to achieve it is to point to application's desktop file, so MIME-types lists aren't duplicated in .desktop file and in plugin.
  • File might be read in more than one application. Either use max(positions) or the position from application that currently handles this file. Latter is preferable due to least surprise principle.

comment:3 Changed 18 months ago by avn

  • Status changed from new to closed
  • Resolution set to fixed
  • Description modified (diff)
Note: See TracTickets for help on using tickets.