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

Can we put the weather data server URL into an easier configurable place? #122

Open
billyswong opened this issue Oct 17, 2023 · 13 comments
Open

Comments

@billyswong
Copy link

The weather data fails to be retrieved again because of the remote server change. #79 (comment)

If the URL isn't hardcoded in libmateweather.so, it will be a lot easier to get things corrected. We don't need to squeeze the last drop of efficiency for periodic weather information update.

@pepa65
Copy link

pepa65 commented Oct 17, 2023

I guess this is the time to do it! Hopefully it will be easier for users to change the URL in case changes happen.

@billyswong
Copy link
Author

Imagine the next time the new URL being longer than the old URL. Ad-hoc patching like what people are doing now won't work.

@raveit65
Copy link
Member

New releases for 1.26 and master branch https://github.com/mate-desktop/libmateweather/releases

@billyswong
Copy link
Author

billyswong commented Oct 20, 2023

Ad-hoc patching seems not working for some people running older Linux distributions. If they don't get the patch from distribution repository at the end, they probably need to compile the library by themselves.

For where to put the URL information, those 3rd party URLs for example can be put into an extra text-format file in /usr/share/libmateweather, where currently only contains the location data in XML.

@pepa65
Copy link

pepa65 commented Oct 20, 2023

Excellent idea to use a currently already used file location for storing the URL(s) in!

@rob5n
Copy link

rob5n commented Oct 26, 2023

How is the average user going to know what the new weather service URL is?

What if the latest URL was stored in a file on github, and the app would occasionally pull the file down and store locally. If it can't find the file on github then use the URL in the local file.

@pepa65
Copy link

pepa65 commented Oct 26, 2023

That would be a great solution! It could be locally edited, but it could all happen automatically too..!

@lukefromdc
Copy link
Member

With libmateweather from current git master I had no trouble showing weather for a nearby airport in the US

@procule
Copy link

procule commented Nov 19, 2023

Ad-hoc patching seems not working for some people running older Linux distributions. If they don't get the patch from distribution repository at the end, they probably need to compile the library by themselves.

It was my case and even recompiling the library didn't work. My guess is that it is related to another linked library (libsoup) doing the request. I have sent a PR to resolve the issue: #131

@pepa65
Copy link

pepa65 commented Nov 20, 2023

I have patched my patch-hack to not include www. in the link, avoiding a 308 redirect which might be causing problems:
patchmatelibweather

@bttrx
Copy link

bttrx commented Nov 24, 2023

I have patched my patch-hack to not include www. in the link, avoiding a 308 redirect which might be causing problems: patchmatelibweather

Your patch is wrong. The search pattern should include www., but the replace pattern not. See https://forums.linuxmint.com/viewtopic.php?p=2399362#p2399362

@pepa65
Copy link

pepa65 commented Nov 25, 2023

Your patch is wrong. The search pattern should include www., but the replace pattern not.

Absolutely right, thanks, good catch. It seems I patched my patch way too hastily.
Corrected now.

@L-U-T-i
Copy link

L-U-T-i commented Dec 24, 2023

How is the average user going to know what the new weather service URL is?

What if the latest URL was stored in a file on github, and the app would occasionally pull the file down and store locally. If it can't find the file on github then use the URL in the local file.

If the average user can not find a new weather service URL (by a google search for instance, or in this particular case through a server response code / redirect), he / she should:
a) get some professional help
b) wait "things to resolve by themselves" (by a package update, if he/she ia able at least to do that...)
I mean generally, for any computer issues.

Probably there wouldn't be /etc directory and/or dconf settings at all if such users would be a reference.

I think some simple way to change this URL (or any other setting that can change over night) would be a great addition, as one has a much more simple way to resolve even temporary changes. For such an average user, nothing would become more complicated though. Meaning a benefit for those who can use it, and no loss for the others.

Your proposal is just another exactly the same problem. Also a github file URL can change, so there would be a need to simply change that setting too. But how shall an average user know that... ;-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants