Skip to content

rclone

RCloneSubmodel

Bases: BaseSettingsModel

Specific settings for RClone sites.

Source code in server/settings/providers/rclone.py
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
class RCloneSubmodel(BaseSettingsModel):
    """Specific settings for RClone sites."""

    rclone_executable_path: MultiplatformPath = SettingsField(
        default_factory=MultiplatformPath,
        title="RClone Executable Path",
        scope=["studio", "project"],
        description="Path to rclone executable. Leave as 'rclone' if it exists on PATH or environment variable expansion is possible. Syntax {LOCALAPPDATA}/path.",
    )

    config_type: str = SettingsField(
        "config_web",
        title="Config Type",
        enum_resolver=_config_type_enum,
        conditional_enum=True,
        description="Choose between file-based config (.conf) or web-based config (define inline)",
    )

    config_file: RCloneConfigSubModel = SettingsField(
        default_factory=RCloneConfigSubModel,
        title="RClone File Config",
        description="Provide an existing rclone.conf file, environment variable expansion is possible. Syntax {LOCALAPPDATA}/path ",
    )

    config_web: RCloneWebConfigSubModel = SettingsField(
        default_factory=RCloneWebConfigSubModel,
        title="RClone Web Config",
        description="Define all required keys from the rclone.conf, no need to distribute a file.",
    )

    root: str = SettingsField(
        "",
        title="Root Folder",
        scope=["studio", "project"],
        description="Root folder on the remote storage.",
    )

    additional_args: list[str] = SettingsField(
        default_factory=list,
        title="Additional Arguments",
        scope=["studio", "project"],
        description="Extra flags for rclone (e.g. ['--checkers=16'])",
    )