Skip to content

Debloat any Android or Google TV over Wi-Fi and get an Apple TV-style home.

Merge PR #972: addons/weather: options for a 7-day forecast, humidity and wind

Gathin2301a6bea69066
diff --cc addons/weather/app/src/main/java/io/github/sumyabazar1/weather/Forecast.java
index 4b64211e3,ccbf5c044..d7b2b050f
--- a/addons/weather/app/src/main/java/io/github/sumyabazar1/weather/Forecast.java
+++ b/addons/weather/app/src/main/java/io/github/sumyabazar1/weather/Forecast.java
@@@ -146,6 -166,6 +166,8 @@@ final class Forecast
JSONArray min = daily.getJSONArray("temperature_2m_min");
List<Day> out = new ArrayList<>();
for (int i = 1; i < dates.length(); i++) {
++ // With forecast_days 7 the last day can come back without values: stop there instead of failing the page.
++ if (codes.isNull(i) || max.isNull(i) || min.isNull(i)) break;
// A day whose high stays near freezing gets the same rain-to-snow correction, with the high and
// saturated air, which is the warm end of the day's precipitation.
out.add(new Day(LocalDate.parse(dates.getString(i)), snowIfCold(codes.getInt(i), max.getDouble(i), 100),