ContentManagerModel depends on the current view settings (filters) much
more than ContentManager does. Since the download state (the set of
active and/or paused downloads and their progress info) is independent
of the view settings it is more natural for ContentManager to own it.
Since the content manager model may be updated (e.g. by applying a
filter) while the thumbnails/favicons are still being loaded it is
better to use a model invariant id for the thumbnails.
When using a debug server (enabled by the environment variables
KIWIX_CATALOG_HOST and KIWIX_CATALOG_PORT) the URLs of the favicons
must be composed correspondingly.
This fix is rather a temporary and ugly hack, since the current mess
with how download states are being maintained (in the presence of
multiple sources of their updates) asks for a major clean-up.
This fixes the bugs related to pending download statuses being discarded
by filtering and similar operations that result in full update of the
ContentManagerModel.
Instead this commit leads to a new bug - completion of a download
is not always properly detected for very small (and thus instantaneous)
downloads. This is caused by library update events triggered by ZIM
directory monitoring (which notifies about a new ZIM file appearing
in the download directory) interfering with the download status update
signal.
Now DownloadState is an optional element of the state of RowNode
and is set in it only in case of an active (even if paused) download
associated with the that entry.
Download update timers are no-longer managed separately in
ContentManagerModel. Instead the timer associated with each active
download is owned by the respective RowNode object.
So far the details of the host serving the OPDS catalog were hardcoded.
In order to debug issues related to large downloads it helps if one
can use one's own server. Hence this enhancement.