Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions weather-api-widget/weather.lua
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,8 @@ end
local function worker(user_args)

local args = user_args or {}
local lang = args.lang or SYS_LANG
local locale = get_locale(lang)

--- Validate required parameters
if args.coordinates == nil or args.api_key == nil then
Expand All @@ -182,7 +184,6 @@ local function worker(user_args)
local api_key = args.api_key
local font_name = args.font_name or beautiful.font:gsub("%s%d+$", "")
local units = args.units or 'metric'
local lang = args.lang or SYS_LANG
local time_format_12h = args.time_format_12h
local both_units_widget = args.both_units_widget or false
local icon_pack_name = args.icons or 'weather-underground-icons'
Expand All @@ -193,8 +194,6 @@ local function worker(user_args)
local timeout = args.timeout or 120
local ICONS_DIR = WIDGET_DIR .. '/icons/' .. icon_pack_name .. '/'

local locale = get_locale(lang)

-- Forecast endpoint includes current. I could map show_daily_forecast to days here.
-- Currently overfetching but only showing when opting in.
local weather_api =
Expand Down