Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix import of items when feed does not exist #1742

Merged
merged 1 commit into from
Apr 18, 2022
Merged

Conversation

Grotax
Copy link
Member

@Grotax Grotax commented Apr 16, 2022

This fixes #1562

The issue with the old logic was that it would create a new feed for each item as the feedLink coming from the json would never exist in the array of feeds.
Because the feed would be added with this placeholder url.

I don't see a need not to use this placeholder url and also no reason to disable updates.

I tested this by adding a feed, exporting the opml and the items.

  1. import of items only, creates the feed, just the title is "No Title" as the json does not contain that information.
  2. import opml first then items, the feed exists with title and items already before the import, importing the items doesn't cause any problems.

@codecov-commenter
Copy link

codecov-commenter commented Apr 16, 2022

Codecov Report

Merging #1742 (be97de5) into master (45368fc) will increase coverage by 0.00%.
The diff coverage is 100.00%.

@@            Coverage Diff            @@
##             master    #1742   +/-   ##
=========================================
  Coverage     91.86%   91.86%           
  Complexity      766      766           
=========================================
  Files            65       65           
  Lines          2692     2705   +13     
=========================================
+ Hits           2473     2485   +12     
- Misses          219      220    +1     
Impacted Files Coverage Δ
lib/Service/ImportService.php 100.00% <100.00%> (ø)
lib/Command/ExploreGenerator.php 100.00% <0.00%> (ø)
lib/Explore/RecommendedSites.php 0.00% <0.00%> (ø)
lib/Controller/FeedController.php 100.00% <0.00%> (ø)
lib/Controller/PageController.php 100.00% <0.00%> (ø)
lib/Fetcher/Client/FeedIoClient.php 100.00% <0.00%> (ø)
lib/Controller/FeedApiController.php 100.00% <0.00%> (ø)
lib/Db/Feed.php 99.05% <0.00%> (+<0.01%) ⬆️
lib/Fetcher/FeedFetcher.php 80.27% <0.00%> (+0.13%) ⬆️
lib/Config/FetcherConfig.php 64.00% <0.00%> (+1.50%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 45368fc...be97de5. Read the comment docs.

lib/Service/ImportService.php Outdated Show resolved Hide resolved
lib/Service/ImportService.php Outdated Show resolved Hide resolved
Signed-off-by: Benjamin Brahmer <info@b-brahmer.de>
@Grotax
Copy link
Member Author

Grotax commented Apr 18, 2022

Currently the webinteface won't directly load the imported feed, you get redirected to the imported feed via the typical url but the webinterface doesn't have the content.

A refresh is required...

Another bug of the broken webinterface

@Grotax Grotax merged commit 78c723f into master Apr 18, 2022
@delete-merged-branch delete-merged-branch bot deleted the fix/import-items branch April 18, 2022 11:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Imported unread/starred articles end up in separate feeds with only one article
3 participants