dataengines/weather/wetter.com: Use location codes for internal mapping
Reason for the change
The engine used to store info about the different locations in a hashmap using the full place name as the key.
Use instead the location code as the key for the different maps, so this is unique, and different places with the same name and country doesn't get merged into one.
The format of the weather "source" string is not changed ("wettercom|weather|<place>|<code>;<displayName>
") so that current user's configs do not break.
Test plan
Select a location from the wetter.com
provider.
As we now keep it as a fallback, you'll need to be creative with your search (an example Salvaterra de Miño
)
The same saved configuration keeps working when applying/removing this MR
Other commits
- dataengines/weather/wetter.com: Improve debug outputs
- dataengines/weather/wetter.com: Use the full place name as the station
- We currently don't show this information on the applet, but it can help disambiguate locations with the same name, either in the different countries or in different districts within the same country
Bugs fixed
Edit: The bug is actually an upstream issue. When using the reporter's search term, the search API just provides one result, even when the web search shows all of them
So this does not fix the bug (newer information came later), but imho it is a better and safer way to organize the hashmaps.