{
  "$type": "com.atproto.lexicon.schema",
  "defs": {
    "main": {
      "description": "A magnet link entry in the Sableye tracker index.",
      "key": "tid",
      "record": {
        "properties": {
          "createdAt": {
            "format": "datetime",
            "type": "string"
          },
          "description": {
            "description": "Optional longer description.",
            "maxGraphemes": 5000,
            "maxLength": 10000,
            "type": "string"
          },
          "fileCount": {
            "description": "Number of files in the torrent, if known.",
            "type": "integer"
          },
          "infoHash": {
            "description": "The info hash extracted from the magnet URI, hex-encoded.",
            "maxLength": 64,
            "type": "string"
          },
          "magnetUri": {
            "description": "The magnet URI (magnet:?xt=urn:btih:...)",
            "maxLength": 2048,
            "type": "string"
          },
          "name": {
            "description": "Display name / title for the torrent.",
            "maxGraphemes": 256,
            "maxLength": 512,
            "type": "string"
          },
          "sizeBytes": {
            "description": "Total size in bytes, if known.",
            "type": "integer"
          },
          "tags": {
            "description": "Categorization tags.",
            "items": {
              "maxGraphemes": 64,
              "maxLength": 128,
              "type": "string"
            },
            "maxLength": 16,
            "type": "array"
          },
          "torrentFile": {
            "accept": [
              "application/x-bittorrent",
              "application/octet-stream"
            ],
            "description": "Optional .torrent file stored on the author's PDS.",
            "maxSize": 5242880,
            "type": "blob"
          }
        },
        "required": [
          "magnetUri",
          "name",
          "createdAt"
        ],
        "type": "object"
      },
      "type": "record"
    }
  },
  "id": "quest.sableye.magnet.entry",
  "lexicon": 1
}
