Skip to content

Commit

Permalink
More localised forecasts
Browse files Browse the repository at this point in the history
  • Loading branch information
evilbunny2008 committed Apr 20, 2021
1 parent c9b3a1a commit 6722ff4
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 12 deletions.
4 changes: 2 additions & 2 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ android {
minSdkVersion 19
//noinspection OldTargetApi
targetSdkVersion 29
versionCode 9006
versionName "0.9.6"
versionCode 9007
versionName "0.9.7"
}
buildTypes {
release {
Expand Down
16 changes: 15 additions & 1 deletion app/src/main/assets/weathericons.css
Original file line number Diff line number Diff line change
Expand Up @@ -3641,4 +3641,18 @@
.wi-ilmeteo-ss24:before {
content: "\f072";
}

.wi-tempoitalia-nuvoloso:before {
content: "\f002";
}
.wi-tempoitalia-nuvoloso_piovaschi:before {
content: "\f00b";
}
.wi-tempoitalia-poco_nuvoloso:before {
content: "\f00c";
}
.wi-tempoitalia-sereno:before {
content: "\f00d";
}
.wi-tempoitalia-molto_nuvoloso:before {
content: "\f002";
}
18 changes: 9 additions & 9 deletions app/src/main/java/com/odiousapps/weewxweather/Common.java
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,8 @@ class Common
static String FAILED_INTENT = "com.odiousapps.weewxweather.FAILED_INTENT";

private static final long inigo_version = 4000;
static final long icon_version = 10;
private static final String icon_url = "https://github.com/evilbunny2008/weeWXWeatherApp/releases/download/0.9.4/icons.zip";
static final long icon_version = 11;
private static final String icon_url = "https://github.com/evilbunny2008/weeWXWeatherApp/releases/download/0.9.6/icons.zip";

private Thread t = null;
private JSONObject nws = null;
Expand Down Expand Up @@ -1755,21 +1755,21 @@ String[] processTempoItalia(String data, boolean showHeader)
day.icon = "file://" + ret[1];
else
return ret;
LogMessage("day.icon=" + day.icon);
// LogMessage("day.icon=" + day.icon);

day.max = bit.split("<td class=\"tempmax\">", 2)[1].split("°C</td>", 2)[0].trim();
day.min = bit.split("<td class=\"tempmin\">", 2)[1].split("°C</td>", 2)[0].trim();

day.text = bit.split("<td class=\"skyDesc\">")[1].split("</td>")[0].trim();

if(use_icons)
if(!use_icons)
{
String fileName = day.icon;
LogMessage("day.icon=" + day.icon);
} else {
day.icon = "wi wi-tempoitalia-" + icon;
String filename = new File(icon).getName();
day.icon = "wi wi-tempoitalia-" + filename.substring(0, filename.length() - 4);
}

LogMessage("day.icon=" + day.icon);

if(metric)
{
day.max += "&deg;C";
Expand Down Expand Up @@ -2429,7 +2429,7 @@ private String[] checkFilesIt(String url) throws Exception
if(f.exists())
return new String[]{"", f.getAbsolutePath()};
} else {
LogMessage(filename);
//LogMessage(filename);
return new String[]{"", f.getAbsolutePath()};
}

Expand Down

0 comments on commit 6722ff4

Please sign in to comment.