{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/tubearchivist/json-schema/tubearchivist-app-config-schema.json",
  "title": "AppConfig",
  "description": "serialize appconfig",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/tubearchivist-appsettings-api-openapi.yml#/components/schemas/AppConfig",
  "type": "object",
  "properties": {
    "subscriptions": {
      "$ref": "#/$defs/AppConfigSub"
    },
    "downloads": {
      "$ref": "#/$defs/AppConfigDownloads"
    },
    "application": {
      "$ref": "#/$defs/AppConfigApp"
    }
  },
  "$defs": {
    "AppConfigApp": {
      "type": "object",
      "description": "serialize app config",
      "properties": {
        "enable_snapshot": {
          "type": "boolean"
        },
        "enable_cast": {
          "type": "boolean"
        }
      },
      "required": [
        "enable_cast",
        "enable_snapshot"
      ]
    },
    "AppConfigDownloads": {
      "type": "object",
      "description": "serialize app config downloads config",
      "properties": {
        "limit_speed": {
          "type": [
            "integer",
            "null"
          ]
        },
        "sleep_interval": {
          "type": [
            "integer",
            "null"
          ]
        },
        "autodelete_days": {
          "type": [
            "integer",
            "null"
          ]
        },
        "format": {
          "type": [
            "string",
            "null"
          ]
        },
        "format_sort": {
          "type": [
            "string",
            "null"
          ]
        },
        "add_metadata": {
          "type": "boolean"
        },
        "subtitle": {
          "type": [
            "string",
            "null"
          ]
        },
        "subtitle_source": {
          "oneOf": [
            {
              "$ref": "#/$defs/SubtitleSourceEnum"
            },
            {
              "$ref": "#/$defs/NullEnum"
            }
          ]
        },
        "subtitle_index": {
          "type": "boolean"
        },
        "comment_max": {
          "type": [
            "string",
            "null"
          ]
        },
        "comment_sort": {
          "oneOf": [
            {
              "$ref": "#/$defs/CommentSortEnum"
            },
            {
              "$ref": "#/$defs/NullEnum"
            }
          ]
        },
        "cookie_import": {
          "type": "boolean"
        },
        "pot_provider_url": {
          "type": [
            "string",
            "null"
          ]
        },
        "throttledratelimit": {
          "type": [
            "integer",
            "null"
          ]
        },
        "extractor_lang": {
          "type": [
            "string",
            "null"
          ]
        },
        "integrate_ryd": {
          "type": "boolean"
        },
        "integrate_sponsorblock": {
          "type": "boolean"
        }
      },
      "required": [
        "add_metadata",
        "autodelete_days",
        "comment_max",
        "comment_sort",
        "cookie_import",
        "extractor_lang",
        "format",
        "format_sort",
        "integrate_ryd",
        "integrate_sponsorblock",
        "limit_speed",
        "pot_provider_url",
        "sleep_interval",
        "subtitle",
        "subtitle_index",
        "subtitle_source",
        "throttledratelimit"
      ]
    },
    "AppConfigSub": {
      "type": "object",
      "description": "serialize app config subscriptions",
      "properties": {
        "channel_size": {
          "type": [
            "integer",
            "null"
          ]
        },
        "live_channel_size": {
          "type": [
            "integer",
            "null"
          ]
        },
        "shorts_channel_size": {
          "type": [
            "integer",
            "null"
          ]
        },
        "playlist_size": {
          "type": [
            "integer",
            "null"
          ]
        },
        "auto_start": {
          "type": "boolean"
        },
        "extract_flat": {
          "type": "boolean"
        }
      }
    },
    "CommentSortEnum": {
      "enum": [
        "top",
        "new"
      ],
      "type": "string",
      "description": "* `top` - top\n* `new` - new"
    },
    "NullEnum": {
      "enum": [
        null
      ]
    },
    "SubtitleSourceEnum": {
      "enum": [
        "auto",
        "user"
      ],
      "type": "string",
      "description": "* `auto` - auto\n* `user` - user"
    }
  }
}