Skip to content

Can you add a function to detect Cloud Type? #69

@grigorusha

Description

@grigorusha

This can be done using the command "config show"

def type_remotes(remote_name):
    command = "config show " + remote_name
    stdout, _ = utils.run_rclone_cmd(command)
    
    process_out = stdout.split('\n')
    for str_out in process_out:
        str_out = str_out.lower()
        if str_out.find("type = ")==0:
            str_out = str_out.replace("type = ","")
            return str_out
    return ""

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions