def METHOD_NAME(self, url: str, filename: str):
    filesPath = os.path.join(os.environ['SCRYPTED_PLUGIN_VOLUME'], 'files')
    fullpath = os.path.join(filesPath, filename)
    if os.path.isfile(fullpath):
        return fullpath
    os.makedirs(os.path.dirname(fullpath), exist_ok=True)
    tmp = fullpath + '.tmp'
    urllib.request.urlretrieve(url, tmp)
    os.rename(tmp, fullpath)
    return fullpath