Skip to content
This repository was archived by the owner on Sep 24, 2025. It is now read-only.

Commit 19fa257

Browse files
authored
πŸ”§ Fixes (#42)
* πŸ”§ Revert some changes
1 parent a275a14 commit 19fa257

File tree

4 files changed

+17
-8
lines changed

4 files changed

+17
-8
lines changed

β€ŽForecast/App.pyβ€Ž

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,6 @@
77
gi.require_version('Adw', '1')
88
from gi.repository import Gtk, Adw, Gdk
99
from urllib.request import urlopen
10-
from dotenv import load_dotenv
11-
load_dotenv()
1210

1311
cities_stack = Gtk.Stack()
1412
toast_overlay = Adw.ToastOverlay.new()

β€ŽForecast/data.pyβ€Ž

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -126,11 +126,11 @@ def set_api_key(key):
126126

127127
class request():
128128
def weather(lat, lon):
129-
response = requests.get(f'https://api.openweathermap.org/data/3.0/onecall?lat={lat}&lon={lon}&units={constants.units}&lang={constants.system_locale}&appid={os.environ.get("WEATHER_TOKEN")}')
129+
response = requests.get(f'https://api.openweathermap.org/data/3.0/onecall?lat={lat}&lon={lon}&units={constants.units}&lang={constants.system_locale}&appid=fe717eebc0eb0b5d9a534b6f6146bc15')
130130
return response.json()
131131

132132
def pollution(lat, lon):
133-
response = requests.get(f'http://api.openweathermap.org/data/2.5/air_pollution?lat={lat}&lon={lon}&units={constants.units}&lang={constants.system_locale}&appid={os.environ.get("WEATHER_TOKEN")}')
133+
response = requests.get(f'http://api.openweathermap.org/data/2.5/air_pollution?lat={lat}&lon={lon}&units={constants.units}&lang={constants.system_locale}&appid=fe717eebc0eb0b5d9a534b6f6146bc15')
134134
return response.json()
135135

136136
row_list = []
@@ -297,18 +297,18 @@ def get_search_result(searchbar, preferenesgroup, self, reverse_query):
297297
lat = reverse_query[0].get_text()
298298
lon = reverse_query[1].get_text()
299299

300-
geocoding = requests.get(f'http://api.openweathermap.org/geo/1.0/reverse?lat={lat}&lon={lon}&limit={global_variables.get_max_search_cities()}&appid={global_variables.get_api_key()}')
300+
geocoding = requests.get(f'http://api.openweathermap.org/geo/1.0/reverse?lat={lat}&lon={lon}&limit={global_variables.get_max_search_cities()}&appid=fe717eebc0eb0b5d9a534b6f6146bc15')
301301
data = geocoding.json()
302302

303303
elif type(reverse_query) == bool:
304304
place_to_search = searchbar.get_text()
305-
geocoding = requests.get(f'http://api.openweathermap.org/geo/1.0/direct?q={place_to_search}&limit={global_variables.get_max_search_cities()}&appid={global_variables.get_api_key()}')
305+
geocoding = requests.get(f'http://api.openweathermap.org/geo/1.0/direct?q={place_to_search}&limit={global_variables.get_max_search_cities()}&appid=fe717eebc0eb0b5d9a534b6f6146bc15')
306306
data = geocoding.json()
307307
if place_to_search == "":
308308
return
309309
elif type(reverse_query) == str:
310310
place_to_search = self
311-
geocoding = requests.get(f'http://api.openweathermap.org/geo/1.0/direct?q={place_to_search}&limit=1&appid={global_variables.get_api_key()}')
311+
geocoding = requests.get(f'http://api.openweathermap.org/geo/1.0/direct?q={place_to_search}&limit=1&appid=fe717eebc0eb0b5d9a534b6f6146bc15')
312312
city = geocoding.json()
313313
if len(city) == 0:
314314
location = f'Ferrara - IT (44.8372737; 11.6186451)'

β€ŽForecast/maps.pyβ€Ž

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ def __init__(self, app, city):
1212
layer = 'clouds_new'
1313

1414
browser = WebKit.WebView()
15-
browser.load_uri(f'https://tile.openweathermap.org/map/{layer}/{0}/{0}/{0}.png?appid={global_variables.get_api_key()}')
15+
# browser.load_uri(f'https://tile.openweathermap.org/map/{layer}/{0}/{0}/{0}.png?appid=')
1616
# browser.load_uri(f'https://weather.salanileo.dev')
1717

1818
scrolled_window = Gtk.ScrolledWindow()

β€Ždata/dev.salaniLeo.forecast.appdata.xml.inβ€Ž

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,17 @@
4242

4343
<releases>
4444

45+
<release version="1.1.0" date="2024-09-01">
46+
<description translate="no">
47+
<p>Version 1.1.0</p>
48+
<ul>
49+
<li>Fixed 12 hour bug</li>
50+
<li>Added mobile friendly UI</li>
51+
<li>Fixed week graph</li>
52+
</ul>
53+
</description>
54+
</release>
55+
4556
<release version="1.0.0" date="2024-05-25">
4657
<description translate="no">
4758
<p>Version 1.0.0</p>

0 commit comments

Comments
Β (0)