Hello, I've fixed the plugin by bumping weather API version to 2.0

Patch is attached

--- xfce4-weather-plugin-0.8.10.orig/panel-plugin/weather.c
+++ xfce4-weather-plugin-0.8.10/panel-plugin/weather.c
@@ -619,17 +619,14 @@ update_handler(plugin_data *data)
         end_tm = *localtime(&end_t);
 
         /* build url */
-        url = g_strdup_printf("https://api.met.no/weatherapi/sunrise/1.1/?";
+        url = g_strdup_printf("https://api.met.no/weatherapi/sunrise/2.0/?";
                               "lat=%s;lon=%s;"
-                              "from=%04d-%02d-%02d;"
-                              "to=%04d-%02d-%02d",
+                              "date=%04d-%02d-%02d;"
+                              "offset=00:00",
                               data->lat, data->lon,
                               now_tm.tm_year + 1900,
-                              now_tm.tm_mon + 1,
-                              now_tm.tm_mday,
-                              end_tm.tm_year + 1900,
-                              end_tm.tm_mon + 1,
-                              end_tm.tm_mday);
+                              now_tm.tm_mon + 1, 
+                              now_tm.tm_mday);
 
         /* start receive thread */
         g_message(_("getting %s"), url);
@@ -647,8 +644,8 @@ update_handler(plugin_data *data)
         /* build url */
         url =
             g_strdup_printf("https://api.met.no/weatherapi";
-                            "/locationforecastlts/1.3/?lat=%s;lon=%s;msl=%d",
-                            data->lat, data->lon, data->msl);
+                            "/locationforecast/2.0/classic?lat=%s;lon=%s",
+                            data->lat, data->lon);
 
         /* start receive thread */
         g_message(_("getting %s"), url);

Reply via email to