-
Notifications
You must be signed in to change notification settings - Fork 189
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
Edit feed url easily. FEATURE REQUEST #666
Comments
This. Otherwise you lose the history of your feed. |
The only way to identify a feed is through it's URL. It's technically impossible to change the feed URL since that would make it another feed. |
Seems unlikely that a feed does not have an id in the database... |
If I follow what you are saying, the feature request cannot be implemented because it requires being implemented? If the current way to identify a feed is by its url, then the fix is to add another way to identify the feed. Updating existing feeds is not a crazy feature so it should imo be supported in |
Heh, I thought I'd trust the maintainer, but yeah, feeds are not identified by their url at all. news/lib/Controller/FeedController.php Lines 285 to 304 in aaf8c88
|
The feedID is a hash of the URL when you look in the data structure instead of the API. It can be changed but that would means that a lot of operations that get done on the URL will break. Just tell the author to stop changing the URL of the RSS feed, your RSS aggregator shouldn't have to work around it. |
It is not: |
That's the API. https://github.com/nextcloud/news/blob/master/lib/Service/FeedService.php#L108 this is the data structure. |
Yes, in which the url hash is only used to check if a feed already exists for that url. news/lib/Service/FeedService.php Lines 122 to 126 in aaf8c88
The item is linked to the feed using the feed id. news/lib/Service/FeedService.php Line 262 in aaf8c88
|
That seems like a pretty useful feature. If you want to make a pull request changing all this and making sure no existing features break be my guest, but you don't need to have an open issue for that so I'm keeping this closed. |
This is completely beside the point. Having a hash of the feed's url doesn't disallow updating said url in any way. PATCH /.../news/feed/:id
{ "url": "new url" } The method already exists, it just needs to support a new field. Sure the I'm not sure why you keep focussing on that url hash which is not used in any way related to this feature request. |
For the ones that actually need this, if you have access to the database, you can use this method (I don't think sqlite has a md5 function so beware): nextcloud=> select
id, url, link, location, url_hash, md5(url), url_hash = md5(url)
from oc_news_feeds
where url ilike '%grafana%';
-[ RECORD 1 ]--------------------------------
id | 47
url | https://grafana.com/blog/index.xml
link | https://grafana.com/blog/
location | https://grafana.com/blog/index.xml
url_hash | 02bc001ad71492850555fe4a260a8455
md5 | 02bc001ad71492850555fe4a260a8455
?column? | t
nextcloud=> update oc_news_feeds
set
url = 'https://grafana.com/blog/index.xml',
location = 'https://grafana.com/blog/index.xml',
link = 'https://grafana.com/blog/',
url_hash = md5('https://grafana.com/blog/index.xml')
where id = 47;
UPDATE 1 |
Thanks bendem: My national newspaper just changed it's feeds' url and was stuck to lose history by recreating a new feed. I updated the table directly like you suggested using phpmyadmin and it worked. The solution proposed by SMillerDev asking them not to change their feed is not really a good one. It doesn't seem to bother him, but I guess they'll implement this when it happens to them. Thanks again! |
This should be reopened, the url_hash issue does not make it impossible since it only is used to check for duplicates. |
I also would like to reopen this issue. My use case is that I have several feeds from nitter istances, and those tends to stop working for any reason after sometime. Being able to modify the URL would be just perfect |
Hello!
I am a happy user of NEWS, and sometimes some feeds just chage the url, and I have to delete them and add them again with a new url.
Is there a way to edit urls of the feeds? With right-click would be great, next to the "rename" option for example.
Cheers!
The text was updated successfully, but these errors were encountered: