cfg json bullcrap
This commit is contained in:
@@ -24,12 +24,12 @@ async def getValidTimestamps(radarType:str) -> list:
|
||||
async with aiohttp.ClientSession() as s:
|
||||
if (radarType == "satrad"):
|
||||
maxImages = 12
|
||||
url = "https://api.weather.com/v3/TileServer/series/productSet?apiKey=" + cfg[twcApiKey] + "&filter=satrad"
|
||||
url = "https://api.weather.com/v3/TileServer/series/productSet?apiKey=" + cfg["twcApiKey"] + "&filter=satrad"
|
||||
series = 'satrad'
|
||||
|
||||
elif (radarType == "radarmosaic"):
|
||||
maxImages = 36
|
||||
url = "https://api.weather.com/v3/TileServer/series/productSet?apiKey=" + cfg[twcApiKey] + "&filter=twcRadarMosaic"
|
||||
url = "https://api.weather.com/v3/TileServer/series/productSet?apiKey=" + cfg["twcApiKey"] + "&filter=twcRadarMosaic"
|
||||
series = 'twcRadarMosaic'
|
||||
|
||||
else:
|
||||
@@ -52,9 +52,9 @@ async def downloadRadarFrames(radarType:str, timestamps: list) -> list:
|
||||
imagesToSend = []
|
||||
|
||||
if (radarType == "satrad"):
|
||||
url_root = cfg[radarBaseUrl]
|
||||
url_root = cfg["radarBaseUrl"]
|
||||
elif (radarType == "radarmosaic"):
|
||||
url_root = cfg[radarBaseUrl]
|
||||
url_root = cfg["radarBaseUrl"]
|
||||
else:
|
||||
l.error(f'Invalid radar type "{radarType}" -- Valid radar types include "satrad", "radarmosaic"')
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user