1
0
mirror of https://github.com/chylex/Nextcloud-News.git synced 2024-11-24 04:42:46 +01:00
Commit Graph

195 Commits

Author SHA1 Message Date
Paul Tirk
5e4c927017 add folder api v2
Signed-off-by: Paul Tirk <paultirk@paultirk.com>
2021-04-08 10:23:11 +02:00
Sean Molenaar
90702dd297 DB: Use boolean parameter for unread/starred
Issue GH-1278

Signed-off-by: Sean Molenaar <sean@seanmolenaar.eu>
2021-04-06 12:43:24 +02:00
Sean Molenaar
951f3eb7ee DB: Allow negative limits
Signed-off-by: Sean Molenaar <sean@seanmolenaar.eu>
2021-04-05 19:18:19 +02:00
Sean Molenaar
78dce7ffe1 DB: Updates should use set()
Issue GH-1211

Signed-off-by: Sean Molenaar <sean@seanmolenaar.eu>
2021-03-31 22:39:00 +02:00
Sean Molenaar
7a2b3ccfa8 chore: Improve test coverage
Signed-off-by: Sean Molenaar <sean@seanmolenaar.eu>
2021-03-30 12:58:47 +02:00
Sean Molenaar
baf1ca8ec9 DB: Don't show deleted feed items
Signed-off-by: Sean Molenaar <sean@seanmolenaar.eu>
2021-03-23 21:11:25 +01:00
Marco Nassabain
5ab065bbff Item: update search index test to use categories
Signed-off-by: Marco Nassabain <marco.nassabain@hotmail.com>
2021-03-17 08:58:42 +01:00
Jimmy Huynh
3ca55613b6 Add tests of categories
Signed-off-by: Jimmy Huynh <linkatox@gmail.com>
2021-03-17 08:58:42 +01:00
Marco Nassabain
b4aab69304 FeedFetcher: update tests to include categories
Signed-off-by: Marco Nassabain <marco.nassabain@hotmail.com>
2021-03-17 08:58:42 +01:00
Marco Nassabain
226a7d0dfb Item: update tests to include categories
Signed-off-by: Marco Nassabain <marco.nassabain@hotmail.com>
2021-03-17 08:58:42 +01:00
Sean Molenaar
9d5d35ce23 DB: Fix offset quotes
Issue GH-1200

Signed-off-by: Sean Molenaar <sean@seanmolenaar.eu>
2021-02-27 15:12:59 +01:00
Sean Molenaar
bf1e71f1a7 DB: Use ID as offset in item queries
Signed-off-by: Sean Molenaar <sean@seanmolenaar.eu>
2021-02-23 17:16:20 +01:00
Sean Molenaar
4e4108aaf8 Feed: Fix rename moving file
Issue #1181

Signed-off-by: Sean Molenaar <sean@seanmolenaar.eu>
2021-02-23 15:06:02 +01:00
Sean Molenaar
4a107b3d53 General: Fix folder query
Signed-off-by: Sean Molenaar <sean@seanmolenaar.eu>
2021-02-20 13:57:09 +01:00
Benjamin Brahmer
6cd83ea1da remove unused lastModified from feed fetcher
Signed-off-by: Benjamin Brahmer <info@b-brahmer.de>
2021-02-16 11:01:10 +01:00
Benjamin Brahmer
c09b4d8d33 prefer the feeds logo over the favicon
The logo of the feed is prefered if it is a square picture,
else the favicon is returned.

Signed-off-by: Benjamin Brahmer <info@b-brahmer.de>
Co-authored-by: Sean Molenaar <SMillerDev@users.noreply.github.com>
2021-02-16 10:16:15 +01:00
anoy
8ca7ef7e49 update sorting column
follow-up for b4fa772bc5 (#1056)

Signed-off-by: anoy <anoymouserver+github@mailbox.org>
2021-02-14 17:15:46 +01:00
Sean Molenaar
b4fa772bc5 Remove V1 item API
Signed-off-by: Sean Molenaar <sean@seanmolenaar.eu>
2021-02-13 13:22:57 +01:00
Sean Molenaar
6e9e2512ea DB: Remove unused fields
Signed-off-by: Sean Molenaar <sean@seanmolenaar.eu>
2021-02-05 09:37:17 +01:00
Sean Molenaar
66b4005b5e Controllers: Export Starred or unread instead of and
Fixes GH-1010

Signed-off-by: Sean Molenaar <sean@seanmolenaar.eu>
2021-02-02 16:07:38 +01:00
Sean Molenaar
023c61b88f Mappers: Implement item purging
Signed-off-by: Sean Molenaar <sean@seanmolenaar.eu>
2021-01-30 18:27:06 +01:00
Sean Molenaar
8fa1537cbf Fetcher: Update client and add test
Signed-off-by: Sean Molenaar <sean@seanmolenaar.eu>
2021-01-20 22:52:09 +01:00
Sean Molenaar
582c4d11fa Controllers: Fetch feed after creating
Signed-off-by: Sean Molenaar <sean@seanmolenaar.eu>
2021-01-18 20:15:13 +01:00
anoy
c67feb8d8d fix TypeError caused by type conversion in controller
Signed-off-by: anoy <anoymouserver+github@mailbox.org>
2021-01-17 17:56:37 +01:00
anoy
8b3516a949 fix opened state of folders is not restored
Signed-off-by: anoy <anoymouserver+github@mailbox.org>
2021-01-13 19:23:46 +01:00
Sean Molenaar
e5d56f2c2e Fix getUnreadOrStarredType
Signed-off-by: Sean Molenaar <sean@seanmolenaar.eu>
2021-01-12 13:29:08 +01:00
Sean Molenaar
f7b43501af Fix nc 21 phpunit issue 2021-01-12 13:29:08 +01:00
anoy
8de3ad77fc remove deprecated colon prefix for parameters
Signed-off-by: anoy <anoymouserver+github@mailbox.org>
2021-01-11 09:32:23 +01:00
Sean Molenaar
05377d023e Remove PHPunit integration tests
Signed-off-by: Sean Molenaar <sean@seanmolenaar.eu>
2020-12-30 11:21:44 +01:00
Sean Molenaar
11f5904dd5 Fix mapper->find and empty user sessions
Signed-off-by: Sean Molenaar <sean@seanmolenaar.eu>
2020-12-17 10:35:23 +01:00
Kevin Decherf
42ea24f2f4 Remove LastModified-based cursor when updating feeds
We remove the call to readSince() as some feeds push new articles with
pubDate prior to the lastModified time stored for these feeds (e.g.
lemonde.fr). As we go through all items of a feed again and again, we
prevent the constant update of an item's lastModified timestamp by
keeping the previous one if its fingerprint does not change.

Fixes #921

Signed-off-by: Kevin Decherf <kevin@kdecherf.com>
2020-12-15 20:02:21 +01:00
Sean Molenaar
4ee3fcb781 Refactor User ID fetching and fix non-specific cleanup
Signed-off-by: Sean Molenaar <sean@seanmolenaar.eu>
2020-12-08 13:58:12 +01:00
Sean Molenaar
8abddeab4f Remove usage of old Folder code
Signed-off-by: Sean Molenaar <sean@seanmolenaar.eu>
2020-12-08 13:58:12 +01:00
Sean Molenaar
7effe4654b Unremove but deprecate User API
Signed-off-by: Sean Molenaar <sean@seanmolenaar.eu>
2020-11-10 16:47:42 +01:00
Sean Molenaar
5bdc2df7f4 Fix unread count and related issues
Issue GH-924

Signed-off-by: Sean Molenaar <sean@seanmolenaar.eu>
2020-11-10 16:47:42 +01:00
anoy
cb32a2c4ed remove deprecated YouTube playlist API
Signed-off-by: anoy <anoymouserver+github@mailbox.org>
2020-11-07 09:57:20 +01:00
Sean Molenaar
af2fd96825 Controllers: Use v2 services
Signed-off-by: Sean Molenaar <sean@seanmolenaar.eu>
2020-11-03 23:12:01 +01:00
Benjamin Brahmer
ab149a7870 fix unittest
Signed-off-by: Benjamin Brahmer <info@b-brahmer.de>
2020-11-03 21:23:04 +01:00
Sean Molenaar
10e8c28fea Add migration with foreign keys
Closes #829

Signed-off-by: Sean Molenaar <sean@seanmolenaar.eu>
2020-11-03 19:58:37 +01:00
Sean Molenaar
c5daf112be Command: Add unittests
Signed-off-by: Sean Molenaar <sean@seanmolenaar.eu>
2020-10-29 08:19:03 +01:00
Sean Molenaar
48a130d3c0 Allow titles to be null
Issue GH-867

Signed-off-by: Sean Molenaar <sean@seanmolenaar.eu>
2020-10-12 21:40:23 +02:00
Sean Molenaar
b46c6df632 Fix usage of at() in unittests
Signed-off-by: Sean Molenaar <sean@seanmolenaar.eu>
2020-10-10 10:26:12 +02:00
Sean Molenaar
49c6f7077d Define microtime as string
Closes #835

Signed-off-by: Sean Molenaar <sean@seanmolenaar.eu>
2020-10-05 09:47:44 +02:00
anoy
4fffe42eb9 fix incorrect cron recommendation
Signed-off-by: anoy <anoymouserver+github@mailbox.org>
2020-10-02 15:43:06 +02:00
Sean Molenaar
e528361141 Add feed autodiscovery
Issue GH-415

Signed-off-by: Sean Molenaar <sean@seanmolenaar.eu>
2020-09-29 21:15:53 +02:00
Sean Molenaar
35b53ecd40 OPML export command and fixes
Signed-off-by: Sean Molenaar <sean@seanmolenaar.eu>
2020-09-29 14:56:07 +02:00
Sean Molenaar
bc01761221 Fix repair step and test it
Signed-off-by: Sean Molenaar <sean@seanmolenaar.eu>
2020-09-29 13:02:03 +02:00
Sean Molenaar
d00d1ab2a2 Create V2 mapper, Service and management commands
Signed-off-by: Sean Molenaar <sean@seanmolenaar.eu>
2020-09-27 15:35:31 +02:00
Sean Molenaar
60ab4941cc Move to nextcloud config and update phpunit
Signed-off-by: Sean Molenaar <sean@seanmolenaar.eu>
2020-09-25 19:18:04 +02:00
Benjamin Brahmer
3a62ffbe88 run phpcbf
Signed-off-by: Benjamin Brahmer <info@b-brahmer.de>
2020-09-17 10:23:43 +02:00
Benjamin Brahmer
7f714ba05d fix config test
Signed-off-by: Benjamin Brahmer <info@b-brahmer.de>
2020-09-17 10:23:43 +02:00
Benjamin Brahmer
dd266ed05f fix import with invalid guid_hash
Signed-off-by: Benjamin Brahmer <info@b-brahmer.de>
2020-08-29 23:45:26 +02:00
Benjamin Brahmer
4ebc906fef Update to new BackgroudJob logic
Signed-off-by: Benjamin Brahmer <info@b-brahmer.de>
2020-08-14 18:22:57 +02:00
Daniel Kesselberg
58ec27e786 Add test to ensure that null will emit a exception
Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
2020-03-09 23:03:30 +01:00
Éloi Rivard
306d3cdc60
Basic Media-RSS support (#599)
Signed-off-by: Éloi Rivard <azmeuk@gmail.com>
2020-02-16 14:26:06 +01:00
kesselb
f045bd0ba3 Update httpLastModified from the feed response (#594)
LastModified is used (in a feed context to see if a user edited a feed). httpLastModified to store the last-modified response from the source.

Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
2019-12-27 03:51:06 +01:00
Benjamin Brahmer
5de8bed01e
Update for nextcloud 18 (#593)
bump nc-compatability 16 to 18, php-min 7.2
adapt tests for nc 18

Signed-off-by: Benjamin Brahmer <info@b-brahmer.de>
2019-12-25 06:40:24 +01:00
DriverXX
6673cbc3d9 Reimplement full-text scraping (#563)
Add readability.php scraper
Fixes #482
Signed-off-by: Gioele Falcetti <thegio.f@gmail.com>
2019-12-24 09:33:19 +01:00
b_b
35c6c91e26 Get content:encoded of item if available (#565)
Get content:encoded of item if available fixes #564

Signed-off-by: brunob <bruno@eliaz.fr>
2019-11-16 14:21:40 +01:00
Sean Molenaar
b37e237c7a Fix xkcd commics 2019-03-26 09:31:03 +01:00
Sean Molenaar
c69bcb8e68 Allow empty-ish lastmodified and clean up FeedFetcher Test (#458) 2019-03-21 05:16:35 +01:00
Sean Molenaar
2698214c41 fix/allow CDATA encoding (#428) 2019-03-17 08:23:37 +01:00
Sean Molenaar
f416213993 Fix email and password not being encoded 2019-03-12 19:58:06 +01:00
Sean Molenaar
9d5ac4b039 Catch FeedIO reader exception.
Closes #413

Closes #412
2019-03-12 13:30:05 +01:00
Sean Molenaar
da0872c5ca Fix references to old manual versions and general cleanup (#404) 2019-03-06 17:04:52 +01:00
Sean Molenaar
71ba5a3ad1 Fix generation commands and make them available in ./occ (#402) 2019-03-06 13:10:37 +01:00
Sean Molenaar
7c17b2c24b
Allow empty update time 2019-02-23 16:11:28 +01:00
Sean Molenaar
ee6bb6ce70
Fix mismatched interface 2019-01-31 13:40:52 +01:00
Sean Molenaar
a3246a927d
Parser: Switch to feedIO for parsing instead of picoFeed 2019-01-30 20:36:40 +01:00
Daniel Opitz
e158cc1d3b use magic class constant instead of classname strings 2018-12-04 17:10:46 +01:00
Benjamin Brahmer
4456ef4a33 fix FeedTest and revert packacge-lock 2018-10-04 10:54:43 +02:00
Sean Molenaar
21e6f5cd6e
Merge pull request #283 from danopz/entity-methods
Entity setters + getters
2018-10-02 14:45:36 +02:00
Sean Molenaar
fa5f07ba9a Put back old tests for stable nextcloud version 2018-10-02 14:33:09 +02:00
Daniel Opitz
89f2c7cfdb add setters + getters to Folder and Item entities, fixed unit tests, rearranged methods 2018-09-28 23:24:10 +02:00
Daniel Opitz
2aabd8fd1f fixed feed tests 2018-09-28 23:24:10 +02:00
David Guillot
5c4185e221 test(api): adapt tests to previous change
All API controllers unit tests now mock IUserSession and IUser to match new expectations
2018-07-01 23:03:36 +02:00
Sean Molenaar
5b94705cf3 Core: Fix compatibility with nextcloud codestyle (#280) 2018-03-27 15:35:06 +02:00
Sean Molenaar
17e85dd507 Unit: Fix unittests (#278)
* Unit: Fix unittests

Issue #171

* Tests: Move test namespace to the expected nextcloud namespace
2018-03-18 15:01:08 +01:00
Daniel Opitz
a97dd58e3b Split binary to booleans (#203)
* replaced old status with 2 flags for unread and starred

* add fields to db, replace int(1,0) with booleans in sql queries, removed StatusFlags class + refactor code relying to it

* add repair step for migration

* again use integer(1,0) instead of bool in sql queries, because of sqlite doesn't support true/false

* add/fix unit tests for new boolean status

* set unread/starred flags as statements in sql

* fixed mysql unknown column items.unread, fixed marking of read items on repair step

* remove unnecessary bool casts

* add empty checks to Items::is* methods

* update migration to use native sql instead of the querybuilder

* don't cast the flags manually, let the api do the work
2017-08-14 10:34:53 +02:00
Daniel Schaal
b7f20c0f36 Fix travis build (#178)
* Use stable12 branch for travis

* Shorten db indices to max 27 characters to satisfy app:check-code

* Use precise container, downgrade to psql 9.4

* Create psql role

* Fix ContentController test

* Fix PageController and StatusService tests

* Use OCP\IDBConnection, OCP\IDb was removed

* Extend IntegrationTest from \Test\Testcase, use loginAsUser to login

* Require phpunit 5, nextcloud tests not compatible with phpunit 6

Change tests to use phpunit from vendor directory
2017-06-06 18:20:20 +02:00
Bernhard Posselt
f15511582d fix unit tests 2017-03-21 22:04:58 +01:00
Robin Appelman
bc27596f70 Add postprocessor for getting lwn subscriber articles (#72) 2017-01-04 11:10:19 +01:00
Daniel Schaal
04f66c9710 Add updatedDate to item model (#81)
* Update picoFeed to v0.1.28

* Add updated_date to database and bump version to 10.1.1

* Add updatedDate to item model

* Check for updatedDate when updating a feed

* Fix unit test to check for newer updatedDate
2017-01-04 11:09:46 +01:00
Daniel Schaal
f658beaf61 Throw ServiceNotFoundException when marking non-existent item as read (#61)
* Throw ServiceNotFoundException when marking non-existent item as read

Fixes #58

* Add test case for marking non-existent item as read
2016-11-18 16:03:31 +01:00
Daniel Schaal
7183da78c6 Use createMock() instead of deprecated getMock() (#62) 2016-11-18 16:03:09 +01:00
Bernhard Posselt
8d63975360 revert 2016-10-02 18:05:49 +02:00
Daniel Schaal
e45511f6ba Add updatedDate to item model (#43)
* Update picoFeed to 0.1.25

* Add updated_date to database

* Add updatedDate to item model

* Bump version to 9.0.5

* Check for updatedDate when updating a feed

* Fix unit test to check for newer updatedDate
2016-10-01 08:34:40 +02:00
Bernhard Posselt
1576df5492 Merge pull request #25 from nextcloud/updated-api
Fix #24
2016-08-28 08:37:56 +02:00
Bernhard Posselt
4acfe5ab74 Fix #24 2016-08-28 08:36:42 +02:00
Bernhard Posselt
0daa9425b6 Delete UpgradeTest.php 2016-08-25 22:51:41 +02:00
Bernhard Posselt
360a9f3054 Fix #20 2016-08-23 20:07:40 +02:00
Bernhard Posselt
44792ace5b Try without 64bit requirement 2016-08-18 21:07:21 +02:00
Bernhard Posselt
38e657a5d5 removing owncloud references and updating links 2016-07-23 22:02:21 +02:00
Bernhard Posselt
7a3a22bd27 Adjust copyright header 2016-07-23 21:32:42 +02:00
Bernhard Posselt
004fcbbcc7 Move to new directory structure 2016-07-23 21:24:54 +02:00