Fixed mapview caching bugs

This commit is contained in:
Mark Qvist 2023-10-26 19:42:18 +02:00
parent 3fecb368e5
commit a373af2b0f
2 changed files with 3 additions and 1 deletions

View file

@ -25,6 +25,7 @@ import logging
# I tried it with a simpler one (just Mozilla/5.0) this also gets rejected
USER_AGENT = 'Kivy-garden.mapview'
import RNS
class Downloader:
_instance = None
@ -51,6 +52,7 @@ class Downloader:
self._futures = []
Clock.schedule_interval(self._check_executor, 1 / 60.0)
if not exists(self.cache_dir):
RNS.log("Creating cache dir "+str(self.cache_dir), RNS.LOG_WARNING)
makedirs(self.cache_dir)
logging.getLogger("urllib3").setLevel(logging.WARNING)