Check an use available compression types of curl
use compression when downloading feed logo
Co-authored-by: Sean Molenaar <SMillerDev@users.noreply.github.com>
Signed-off-by: Benjamin Brahmer <info@b-brahmer.de>
As long as we use Feed-io < 6, we always use Guzzle (with Feed-io 6, we
need to choose a [HTTPlug](https://httplug.io/) library ourselves). Guzzle
[supports](https://docs.guzzlephp.org/en/stable/request-options.html#decode-content)
transparently decompressing gzip or deflate compressed responses, which is enabled by default.
Feed-io does this [by default](ffef9eaabe),
but as we override the headers, we have to add a fitting `Accept-Encoding` header as well.
Previously, my feed collection caused up to 45.9 MB download traffic per cronjob,
with this commit it is as low as 23.6 MB.
Signed-off-by: Mynacol <Mynacol@users.noreply.github.com>
if this is not updated the API won't work correctly and we get sync errors.
Adjust test to use item api
Signed-off-by: Benjamin Brahmer <info@b-brahmer.de>
if timestamp is not set during creation of a feed use date one year ago
code fixes and linting fixes.
Co-authored-by: Sean Molenaar <SMillerDev@users.noreply.github.com>
Signed-off-by: Benjamin Brahmer <info@b-brahmer.de>
Our background job was renamed quite a while ago
the old job remained in the db, to prevent confusion this adds
a repair step to remove the old job.
Signed-off-by: Benjamin Brahmer <info@b-brahmer.de>
don't process body of feed if it's null
Co-authored-by: Sean Molenaar <SMillerDev@users.noreply.github.com>
Signed-off-by: Benjamin Brahmer <info@b-brahmer.de>
The league/uri version that we inherit in Nextcloud is a bit outdated.
That version can't handle certain uris.
Signed-off-by: Benjamin Brahmer <info@b-brahmer.de>
* Port admin settings to vue
Co-authored-by: anoy. <anoymouserver@users.noreply.github.com>
Co-authored-by: Benjamin Brahmer <info@b-brahmer.de>
Signed-off-by: Carl Schwan <carl@carlschwan.eu>
* change autodiscover behaviour to only run if the provided url is not already a feed
* Execute feed check after the final url is found
Signed-off-by: Benjamin Brahmer <info@b-brahmer.de>
Co-authored-by: Sean Molenaar <SMillerDev@users.noreply.github.com>
* Use Feed Link as GUID when Feed omits Guid.
As noted in nextcloud/news#1702 some feeds omit the GUID and are
therefore not a valid RSS feed.
nextcloud/news#1738 resolved the issue to allow valid feeds to
update correctly when an invalid feed is present.
This commit allows parsing of the invalid feed as well by assuming
that the item link of the feed is unique to the feed and using
it in place of the GUID when the feed omits the GUID.
This will allow NextCloud News to accept and behave like many other
popular feed aggregators when presented with such an invalid feed.
Signed-off-by: Accalia <Accalia@Elementia.me>
* Add basic Logging when using fallback guid
Signed-off-by: Accalia <Accalia@Elementia.me>
* Add basic Logging when using fallback guid - Fix Fatfinger Typo
Signed-off-by: Accalia <Accalia@Elementia.me>
* Add basic Logging when using fallback guid - Update tests to account for additional logging
Signed-off-by: Accalia <Accalia@Elementia.me>
Signed-off-by: Benjamin Brahmer <info@b-brahmer.de>
this way it works
Signed-off-by: Benjamin Brahmer <info@b-brahmer.de>
add changelog entry
Signed-off-by: Benjamin Brahmer <info@b-brahmer.de>
Partly fix test
Signed-off-by: Benjamin Brahmer <info@b-brahmer.de>
test passing
Signed-off-by: Benjamin Brahmer <info@b-brahmer.de>