82 Commits

Author SHA1 Message Date
Bart De Vries
d0bc5b2b26 Add capability to check whether network connection is metered
For now this only works with NetworkManager.  The related settings are
greyed out on systems not using NetworkManager.

Some details of the implementation:
- Implement settings in the settings menu to enable/disable feed
  updates, episode downloads and/ or image downloads on metered
  connections.  If the option(s) is disabled, an overlay dialog is shown
  with options to "not allow", "allow once", or "allow always".
- If the network is down, no attempt is made to download images and the
  fallback image will be used until the network is up again.
  This also solves an issue where the application hangs when the network
  is down and feed images have not been cached yet.
- Next to this, part of the cachedImage implementation in Entry and Feed
  has been refactored to re-use code as part of the image() method in
  Fetcher.
- In case something unexpected happens, an error will be logged.
2021-07-03 20:20:27 +02:00
Bart De Vries
bcafb26c8c Add filesize units to download progress
This adds the currently downloaded size and the total enclosure size to
the entry delegate.
2021-06-24 17:12:07 +02:00
Bart De Vries
f197e6ab02 Implement Enclosure::PartiallyDownloaded status
Still to be done:
- Update Download Page to show partial downloads.
- Connect signals to Download Page to update whenever an enclosure
  changes status.  This is broken by this commit because
  downloadCountChanged has been removed.
2021-06-23 23:04:18 +02:00
Bart De Vries
03081edc66 Improve estimate of enclosure download size, also when resuming 2021-06-23 22:29:15 +02:00
Bart De Vries
49977adc38 Refactor Error implementation and add Error::Type
- This refactoring also includes a cleanup of a lot of header includes to
  avoid circular dependencies.
- The error message will now be shown below the info message.
- Add database migration (for Errors)
2021-06-19 17:09:44 +02:00
Bart De Vries
26d3755922 Use debug categories in fetcher.cpp for partial downloads 2021-06-11 20:30:15 +02:00
Bart De Vries
a24fb7d731 Get correct enclosure file size as soon as possible when download starts 2021-06-11 16:59:03 +02:00
Bart De Vries
d24b7ed7d0 Write downloads to disk and enable download resume
This enables the download method in Fetcher to resume in case a partial
download is already saved to disk.
For full implementation of download resumes, more changes are required,
because the current application will automatically clean up files that
don't match the expected size at startup.
2021-06-11 16:59:03 +02:00
Bart De Vries
2ed33aa750 Add debugging logging categories 2021-06-05 22:03:22 +02:00
Bart De Vries
9c83ee08e8 Show BusyIndicator on newly added feeds until they have finished updating 2021-05-08 16:13:28 +02:00
Bart De Vries
cfae4a9fa9 Defer resetting the new flag on feeds until everything's been processed
Resetting the flag immediately can lead to situations where all entries
of a new feed are marked as new if the initial feed import gets
interrupted somehow.  E.g. when the user quits the application while
doing an initial import.
2021-05-07 10:26:58 +02:00
Bart De Vries
8e3a688ddf Don't mark any episodes as new when adding new feeds
Tobias was right; marking one (or more) episodes as "new" on a new feed
doesn't make a lot of sense.  The latest episode from some podcast feeds
can be very old.  Besides, it's quite annoying having a lot of episodes
queued automatically...
2021-05-05 14:04:47 +02:00
Bart De Vries
1c44e717ae Renaming alligator to kasts everywhere 2021-05-03 22:31:45 +02:00
Bart De Vries
1b1654d1f4 Apply clang-format 2021-05-01 21:35:37 +02:00
Bart De Vries
d1618943f5 Update based on review by Tobias Fella 2021-05-01 21:09:07 +02:00
Bart De Vries
4aa2f14eb7 Apply 50 suggestion(s) to 19 file(s) 2021-05-01 18:59:08 +00:00
Bart De Vries
02e92f9a8f Remove numberNewEpisodes from settings
Also clean up the unused allowStreaming setting
2021-04-27 20:58:01 +02:00
Bart De Vries
f2c6c3fae2 Avoid race condition when adding feed
When adding a feed and simultaneously starting a feed update, a race
condition could happen where the feed update would catch up with the
feed adding, and start adding and marking old episodes as new before
the original addFeed method would reach them.
2021-04-26 16:58:22 +02:00
Bart De Vries
5a0972372b Add ErrorModel, just a placholder GUI for now 2021-04-24 23:32:10 +02:00
Bart De Vries
695baf9cbb Add fetch function that can take a list of urls 2021-04-21 14:53:03 +02:00
Bart De Vries
28e8051500 Implement update status progress indicator 2021-04-21 14:53:03 +02:00
Bart De Vries
53e2560796 Implement backend for feed update progress 2021-04-21 14:53:03 +02:00
Bart De Vries
6a256baa18 Disable more debug output
Disable in fetcher and datamanager
2021-04-21 14:53:03 +02:00
Bart De Vries
68771f4911 Solve problem in logic where it would only fetch the first new episode 2021-04-21 14:53:03 +02:00
Bart De Vries
a45351e1de Make entry models only update if something really changed 2021-04-21 14:53:03 +02:00
Bart De Vries
7ebfebe01e Fix potential issue with processing update of authors 2021-04-21 14:53:03 +02:00
Bart De Vries
ae13eb8cfd Begin refactoring feed updating routines for speed
Make sure that property change signals are only emitted when something
has really changed.  So far part "feed" has been done.  Entries,
enclosures and entry authors still need to be done.
2021-04-21 14:53:03 +02:00
Bart De Vries
e9d20ec569 Implement Downloads page
This change includes an update to the database, adding a downloaded
column in Enclosures.
2021-04-21 14:53:03 +02:00
Bart De Vries
16c052250c Make main thread more responsive when updating feeds 2021-04-21 14:53:02 +02:00
Bart De Vries
65ef16017b Rename AlligatorSettings to SettingsManager 2021-04-21 14:53:02 +02:00
Bart De Vries
a8e174739f Implement "new" episodes feature and autoQueue 2021-04-21 14:53:02 +02:00
Bart De Vries
26986616c7 Only mark episodes as read/new on new feeds, not on existing ones 2021-04-21 14:53:02 +02:00
Bart De Vries
3a4cdbfec0 Implement limited number of new entries for new feed 2021-04-21 14:53:02 +02:00
Bart De Vries
e85a3068fc Add check whether to insert or update enclosure to database 2021-04-21 14:53:02 +02:00
Bart De Vries
5d6f05e55e Update copyright headers 2021-04-21 14:53:02 +02:00
Bart De Vries
59da275f0e Completely fix author update on feed refresh/add 2021-04-21 14:53:02 +02:00
Bart De Vries
e092354696 Partially solve adding author for feed 2021-04-21 14:53:02 +02:00
Bart De Vries
75f8f93da7 Change paths where images and enclosures are saved
Images are now stored in the cache directory in a dedicated subdir
called "images".
Enclosures are stored in the data directory in a dedicated subdir
"enclosures".
2021-04-21 14:53:02 +02:00
Bart De Vries
06bffdb5e3 Add "new" and "playposition" to database
These fields have been added to, respectively, Entries and Enclosures.
2021-04-21 14:53:02 +02:00
Bart De Vries
bb7f3393a7 Enable entry images in listviews/listmodels 2021-04-21 14:53:02 +02:00
Bart De Vries
0aa9e91f19 Add support for additional itunes tags
Most of the itunes fields are used as backup for non-existent regular
fields.
One exception is the entry image, which only exists in itunes tags.
2021-04-21 14:53:02 +02:00
Bart De Vries
8b78de960b Initial attempt at parsing extra itunes tags 2021-04-21 14:52:33 +02:00
Bart De Vries
0808d3b5fe Almost done with complete refactoring (no queue yet) 2021-04-21 14:52:33 +02:00
Tobias Fella
e5837425d3
Support podcasts 2021-03-22 23:33:44 +01:00
Nicolas Fella
aff8c3456e Add missing includes 2021-03-12 00:19:04 +01:00
Tobias Fella
7d75c6cf9b Make more things const & 2020-11-01 13:18:11 +01:00
Tobias Fella
86621fe7d6 Fix bools in database 2020-08-22 21:48:32 +02:00
Tobias Fella
db30f159c4 Convert license headers to SPDX 2020-08-14 20:57:40 +02:00
Tobias Fella
87ddc41f32 Notify when image finished downloading 2020-07-04 23:29:46 +02:00
Tobias Fella
d59a1ef1ec Expose network errors to qml 2020-07-02 21:57:09 +02:00