This change greatly reduces the chance that a backup is not performed
when a new photo/video is made.
Instead of combining the change trigger and additonal constraints (wifi
or charging) into a single worker, these aspects are now separated.
Thus, it is now reliably possible to take pictures while the wifi
constraint is not satisfied and upload them hours/days later once
connected to wifi without taking a new photo.
As a positive side effect, this simplifies the error/retry handling
by directly leveraging Android's WorkManager without workarounds.
The separation also allows to notify the currently running BackupWorker
that new assets were added while backing up other assets to also upload
those newly added assets.
Further, a new tiny service checks if the app is killed, to reschedule
the content change worker and allow to detect the first new photo.
Bonus: The home screen now shows backup as enabled if background backup
is active.
* use separate worker/task for listening on changed/added assets
* use separate worker/task for performing the backup
* content observer worker enqueues backup worker on each new asset
* wifi/charging constraints only apply to backup worker
* backupworker is notified of assets added while running to re-run
* new service to catch app being killed to workaround WorkManager issue
* Get asset and album count
* Generate APIs
* Added asset count for each type
* Added api on the web
* Added info button for asset and album count to trigger getting info on hover
* Remove websocket event from photo page
* Add route to query albums for a specific asset
* Update API and add to detail-panel
* Fix tests
* Refactor API endpoint
* Added alt attribute to img tag
Co-authored-by: Alex <alex.tran1502@gmail.com>
* Use custom caches in all modules
* Cache Settings
* Fix wrong key
* Create custom cache repository based on hive
* Show cache usage in settings
* Show cache sizes
* Change settings ranges and default value
* Handle cache clear by operating system
* Resolve review comments
* build endpoint to get asset count by month
* Added asset repository
* Added create asset
* get asset by device ID
* Added test for existing methods
* Refactor additional endpoint
* Refactor database api to get curated locations and curated objects
* Refactor get search properties
* Fixed cookies parsing for websocket
* Added API to get asset count by time group
* Remove unused code
* show notifications on background backup errors
* settings page to configure (background backup error) notifications
* persist time since failed background backup
* fix darkmode slider color
* Add settings options for number of assets per row and storage indicator
* Add attributes to enum to avoid duplicate code
* Also apply customizations to albums
* Minor Refactorings
* Three stage loading i18n fix