ui: improved downloader plugin

Create the paths where the files will be downloaded.
This commit is contained in:
Gustavo Iñiguez Goia
2025-06-08 23:59:51 +02:00
parent 376b06ef97
commit f230b706b7
@@ -1,4 +1,5 @@
import os
import os.path
import logging
import requests
import threading
@@ -72,6 +73,9 @@ class Downloader(PluginBase):
if url['localfile'] == "" or url['remote'] == "" or config['name'] == "":
logger.debug("compile() downloader name, url, localfile, units and interval fields cannot be empty")
continue
localdir = os.path.dirname(url['localfile'])
if not os.path.isdir(localdir):
os.makedirs(localdir, 0o700)
self._notify = config.get('notify')
if self._notify != None: