# -*- coding: utf-8 -*-
"""CloudDrive2 Plugin Constants"""

ADDON_ID = "plugin.video.clouddrive2"
ADDON_NAME = "CloudDrive2"

# CloudDrive2 gRPC service
CD2_DEFAULT_HOST = "localhost"
CD2_DEFAULT_PORT = 19798
CD2_SERVICE_NAME = "clouddrive2"

# Cloud providers that support QR code login
QR_LOGIN_PROVIDERS = {
    "115open": {
        "name": "115 Open",
        "rpc": "APILogin115OpenQRCode",
        "desc": "115 网盘 Open API 扫码登录",
    },
    "aliyundrive": {
        "name": "Aliyundrive Open",
        "rpc": "APILoginAliyunDriveQRCode",
        "desc": "阿里云盘 Open API 扫码登录",
    },
    "189": {
        "name": "189 Cloud",
        "rpc": "APILogin189QRCode",
        "desc": "189 天翼云盘扫码登录",
    },
    "guangyapan": {
        "name": "GuangYaPan",
        "rpc": "APILoginGuangYaPanQRCode",
        "desc": "光鸭云盘扫码登录",
    },
}

# URL routing modes
MODE_MAIN = "main"
MODE_ACCOUNT_CHECK = "account_check"
MODE_ACCOUNT_REGISTER = "account_register"
MODE_ACCOUNT_LOGIN = "account_login"
MODE_CLOUD_LIST = "cloud_list"
MODE_CLOUD_ADD = "cloud_add"
MODE_CLOUD_ADD_QR = "cloud_add_qr"
MODE_CLOUD_ADD_ALIST = "cloud_add_alist"
MODE_CLOUD_ADD_SMB = "cloud_add_smb"
MODE_SMB_SERVERS = "smb_servers"
MODE_SMB_SHARES = "smb_shares"
MODE_SMB_LOGIN = "smb_login"
MODE_CLOUD_REMOVE = "cloud_remove"
MODE_CLOUD_SPACE = "cloud_space"
MODE_BROWSE = "browse"
MODE_MOUNT_LIST = "mount_list"
MODE_MOUNT_ADD = "mount_add"
MODE_MOUNT_REMOVE = "mount_remove"
MODE_MOUNT_TOGGLE = "mount_toggle"
MODE_MOUNT_RESTORE = "mount_restore"
MODE_ACCOUNT_INFO = "account_info"
MODE_SETTINGS = "settings"
MODE_SEARCH = "search"
MODE_CHECK_UPDATE = "check_update"
MODE_PLAY_FILE = "play_file"
MODE_FILE_BROWSE = "file_browse"
MODE_DOWNLOAD_FILE = "download_file"
MODE_SERVICE_START = "service_start"
MODE_SERVICE_STOP = "service_stop"
MODE_WEB_ADMIN = "web_admin"
MODE_NOOP = "noop"
