Download manager rewrite (#535)

* Saving to SD working

* Rename imagePath to uri

* Handle android < 21

* Minor changes

* Separate downloader from the manager. Optimize folder lookups

* Persist downloads across restarts

* Fix for #511

* Updated ReactiveNetwork. Add some documentation

* More documentation and minor fixes

* Handle persistent notifications. Other minor changes

* Improve downloader and add documentation

* Rename pageNumber to index in Page class

* Remove unused methods

* Use chop method

* Make sure dest dir is created

* Reset downloads dir preference

* Use invalidate options menu in download fragment and fix wrong condition

* Fix empty download queue after application restart

* Use addAll method in download queue to avoid too many notifications

* Inform download manager changes
This commit is contained in:
inorichi
2016-11-20 11:20:57 +01:00
committed by GitHub
parent 59c626b4a8
commit 6f297161de
34 changed files with 1325 additions and 855 deletions

View File

@@ -42,12 +42,11 @@
<string name="pref_filter_downloaded_key">pref_filter_downloaded_key</string>
<string name="pref_filter_unread_key">pref_filter_unread_key</string>
<string name="pref_download_directory_key">pref_download_directory_key</string>
<string name="pref_download_directory_key">download_directory</string>
<string name="pref_download_slots_key">pref_download_slots_key</string>
<string name="pref_remove_after_read_slots_key">remove_after_read_slots</string>
<string name="pref_download_only_over_wifi_key">pref_download_only_over_wifi_key</string>
<string name="pref_remove_after_marked_as_read_key">pref_remove_after_marked_as_read_key</string>
<string name="pref_category_remove_after_read_key">pref_category_remove_after_read_key</string>
<string name="pref_last_used_category_key">last_used_category</string>
<string name="pref_source_languages">pref_source_languages</string>

View File

@@ -350,10 +350,12 @@
<string name="information_empty_library">Empty library</string>
<!-- Download Notification -->
<string name="download_notifier_downloader_title">Downloader</string>
<string name="download_notifier_title_error">Error</string>
<string name="download_notifier_unkown_error">An unexpected error occurred while downloading chapter</string>
<string name="download_notifier_page_error">A page is missing in directory</string>
<string name="download_notifier_page_ready_error">A page is not loaded</string>
<string name="download_notifier_text_only_wifi">No wifi connection available</string>
<string name="download_notifier_no_network">No network connection available</string>
</resources>