Cotton code
462 lines · 11.2 KB · JSONRaw
{  "lists": {    "film_nfo": "movie.nfo",    "series_nfo": "tvshow.nfo",    "subtitle_extensions": [      "srt",      "vtt",      "ass",      "ssa"    ],    "art_extensions": [      "jpg",      "png"    ],    "poster_names": [      "poster",      "folder"    ],    "backdrop_names": [      "fanart"    ],    "forced_words": [      "forced"    ],    "sdh_words": [      "sdh",      "cc",      "hi"    ],    "id_kinds": [      "tmdb",      "imdb",      "tvdb"    ],    "languages": {      "eng": "en",      "hin": "hi",      "tam": "ta",      "tel": "te",      "mal": "ml",      "kan": "kn",      "ben": "bn",      "mar": "mr",      "urd": "ur",      "pan": "pa",      "guj": "gu",      "fre": "fr",      "fra": "fr",      "ger": "de",      "deu": "de",      "spa": "es",      "ita": "it",      "por": "pt",      "rus": "ru",      "jpn": "ja",      "kor": "ko",      "chi": "zh",      "zho": "zh",      "ara": "ar",      "dut": "nl",      "nld": "nl",      "swe": "sv",      "nor": "no",      "nob": "nb",      "dan": "da",      "fin": "fi",      "pol": "pl",      "tur": "tr",      "gre": "el",      "ell": "el",      "heb": "he",      "tha": "th",      "vie": "vi",      "ind": "id",      "may": "ms",      "msa": "ms",      "ukr": "uk",      "cze": "cs",      "ces": "cs",      "hun": "hu",      "rum": "ro",      "ron": "ro",      "per": "fa",      "fas": "fa",      "ice": "is",      "isl": "is",      "bul": "bg",      "hrv": "hr",      "srp": "sr",      "slo": "sk",      "slk": "sk",      "slv": "sl",      "est": "et",      "lav": "lv",      "lit": "lt",      "english": "en",      "hindi": "hi",      "french": "fr",      "german": "de",      "spanish": "es",      "italian": "it",      "tamil": "ta"    }  },  "sidecars": [    {      "video": "Films/Night Ferry (2019)/Night Ferry (2019).mkv",      "episode": false,      "siblings": [        "Night Ferry (2019).mkv",        "Night Ferry (2019).nfo",        "movie.nfo",        "Night Ferry (2019).en.srt",        "Night Ferry (2019).hin.forced.srt",        "Night Ferry (2019).English.SDH.vtt",        "Night Ferry (2019).srt",        "Night Ferry (2019).fr.ass",        "Other Film.en.srt",        "poster.jpg",        "folder.jpg",        "fanart.jpg",        "Night Ferry (2019).txt"      ],      "expect": {        "nfo": "Night Ferry (2019).nfo",        "subtitles": [          {            "file": "Night Ferry (2019).English.SDH.vtt",            "language": "en",            "sdh": true          },          {            "file": "Night Ferry (2019).en.srt",            "language": "en"          },          {            "file": "Night Ferry (2019).fr.ass",            "language": "fr"          },          {            "file": "Night Ferry (2019).hin.forced.srt",            "language": "hi",            "forced": true          },          {            "file": "Night Ferry (2019).srt",            "language": "und"          }        ],        "poster": "poster.jpg",        "backdrop": "fanart.jpg"      }    },    {      "video": "Dust Signals.mp4",      "episode": false,      "siblings": [        "Dust Signals.mp4",        "MOVIE.NFO",        "Folder.JPG",        "Dust Signals-fanart.png",        "Dust Signals.pt-br.srt",        "Dust Signals.Some Group.srt"      ],      "expect": {        "nfo": "MOVIE.NFO",        "subtitles": [          {            "file": "Dust Signals.Some Group.srt",            "language": "und"          },          {            "file": "Dust Signals.pt-br.srt",            "language": "pt-br"          }        ],        "poster": "Folder.JPG",        "backdrop": "Dust Signals-fanart.png"      }    },    {      "video": "Paper Comets.mov",      "episode": false,      "siblings": [        "Paper Comets.mov",        "Paper Comets-poster.png",        "poster.jpg"      ],      "expect": {        "poster": "Paper Comets-poster.png"      }    },    {      "video": "Lowmarsh/Season 02/S02E05 - The Long Night.mkv",      "episode": true,      "siblings": [        "S02E05 - The Long Night.mkv",        "S02E05 - The Long Night.nfo",        "movie.nfo",        "S02E05 - The Long Night.eng.srt",        "poster.jpg",        "fanart.jpg",        "S02E06.nfo"      ],      "expect": {        "nfo": "S02E05 - The Long Night.nfo",        "subtitles": [          {            "file": "S02E05 - The Long Night.eng.srt",            "language": "en"          }        ]      }    }  ],  "series": [    {      "siblings": [        "tvshow.nfo",        "poster.png",        "fanart.jpg",        "Season 01"      ],      "expect": {        "nfo": "tvshow.nfo",        "poster": "poster.png",        "backdrop": "fanart.jpg"      }    },    {      "siblings": [        "Season 01"      ],      "expect": {}    }  ],  "nfo": [    {      "name": "movie",      "text": "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\" ?>\n<movie>\n  <title>Night Ferry</title>\n  <originaltitle>Nachtfähre</originaltitle>\n  <year>2019</year>\n  <plot><![CDATA[A ferry crosses at night & nobody sleeps.]]></plot>\n  <runtime>104</runtime>\n  <premiered>2019-03-08</premiered>\n  <uniqueid type=\"imdb\">tt0000101</uniqueid>\n  <uniqueid type=\"tmdb\" default=\"true\">900101</uniqueid>\n  <uniqueid type=\"tvdb\">5501</uniqueid>\n  <uniqueid type=\"trakt\">77</uniqueid>\n  <actor><name>Iris Calder</name><role>Pilot</role></actor>\n  <set><name>Ferry Films</name><overview>Two films</overview></set>\n  <ratings><rating name=\"imdb\"><value>7.1</value></rating></ratings>\n</movie>\n",      "expect": {        "kind": "movie",        "title": "Night Ferry",        "original_title": "Nachtfähre",        "year": "2019",        "plot": "A ferry crosses at night & nobody sleeps.",        "runtime": 104,        "ids": [          {            "kind": "tmdb",            "value": "900101"          },          {            "kind": "imdb",            "value": "tt0000101"          },          {            "kind": "tvdb",            "value": "5501"          }        ],        "aired": "2019-03-08"      }    },    {      "name": "tvshow",      "text": "<tvshow>\n  <title>Lowmarsh</title>\n  <plot>A town under water.</plot>\n  <premiered>2021-09-01</premiered>\n  <uniqueid type=\"tvdb\" default=\"true\">440011</uniqueid>\n  <uniqueid type=\"tmdb\">880011</uniqueid>\n  <uniqueid type=\"imdb\">tt0000202</uniqueid>\n</tvshow>",      "expect": {        "kind": "tvshow",        "title": "Lowmarsh",        "year": "2021",        "plot": "A town under water.",        "ids": [          {            "kind": "tvdb",            "value": "440011"          },          {            "kind": "tmdb",            "value": "880011"          },          {            "kind": "imdb",            "value": "tt0000202"          }        ],        "aired": "2021-09-01"      }    },    {      "name": "episode",      "text": "<episodedetails>\n  <title>The Long Night</title>\n  <season>2</season>\n  <episode>5</episode>\n  <aired>2022-10-14</aired>\n  <runtime>48 min</runtime>\n  <plot>The water rises &amp; the bell rings.</plot>\n  <uniqueid type=\"tvdb\" default=\"true\">9900105</uniqueid>\n  <uniqueid type=\"tmdb\">7700105</uniqueid>\n</episodedetails>",      "expect": {        "kind": "episodedetails",        "title": "The Long Night",        "year": "2022",        "plot": "The water rises & the bell rings.",        "runtime": 48,        "ids": [          {            "kind": "tvdb",            "value": "9900105"          },          {            "kind": "tmdb",            "value": "7700105"          }        ],        "aired": "2022-10-14",        "season": 2,        "episode": 5      }    },    {      "name": "old id, a year that is no year",      "text": "<movie><title>Paper Comets</title><id>tt0000303</id><year>circa 1999</year><originaltitle>Paper Comets</originaltitle></movie>",      "expect": {        "kind": "movie",        "title": "Paper Comets",        "original_title": "Paper Comets",        "ids": [          {            "kind": "imdb",            "value": "tt0000303"          }        ]      }    },    {      "name": "an address alone",      "text": "https://www.themoviedb.org/movie/900404-dust-signals\nhttps://www.imdb.com/title/tt0000404/\n",      "expect": {        "kind": "url",        "ids": [          {            "kind": "tmdb",            "value": "900404"          },          {            "kind": "imdb",            "value": "tt0000404"          }        ]      }    },    {      "name": "not an nfo",      "text": "<html><body>hello</body></html>",      "expect": null    },    {      "name": "empty",      "text": "",      "expect": null    }  ],  "patch": [    {      "name": "a new film takes everything, ids first",      "nfo": "movie",      "table": "film",      "row": {        "title": "",        "minutes": 101      },      "expect": {        "tmdb_id": "900101",        "imdb_id": "tt0000101",        "tvdb_id": "5501",        "title": "Night Ferry",        "synopsis": "A ferry crosses at night & nobody sleeps.",        "original_title": "Nachtfähre",        "year": "2019",        "filled_from": {          "tmdb_id": "nfo",          "imdb_id": "nfo",          "tvdb_id": "nfo",          "title": "nfo",          "synopsis": "nfo",          "original_title": "nfo",          "year": "nfo"        }      }    },    {      "name": "what the person wrote stays",      "nfo": "movie",      "table": "film",      "row": {        "title": "My Ferry",        "year": "2018",        "synopsis": "mine",        "tmdb_id": "900101",        "imdb_id": "tt0000101",        "tvdb_id": "5501",        "original_title": "x",        "minutes": 100,        "filled_from": "{\"poster\":\"tmdb\"}"      },      "expect": {}    },    {      "name": "filled_from keeps what it said",      "nfo": "movie",      "table": "film",      "row": {        "title": "Night Ferry",        "year": "2019",        "synopsis": "s",        "imdb_id": "tt0000101",        "tvdb_id": "5501",        "original_title": "o",        "minutes": 104,        "filled_from": "{\"poster\":\"tmdb\"}"      },      "expect": {        "tmdb_id": "900101",        "filled_from": {          "poster": "tmdb",          "tmdb_id": "nfo"        }      }    },    {      "name": "an episode",      "nfo": "episode",      "table": "film_episode",      "row": {        "title": "Episode 5",        "number": 5      },      "expect": {        "tmdb_id": "7700105",        "tvdb_id": "9900105",        "synopsis": "The water rises & the bell rings.",        "minutes": 48,        "aired": "2022-10-14",        "filled_from": {          "tmdb_id": "nfo",          "tvdb_id": "nfo",          "synopsis": "nfo",          "minutes": "nfo",          "aired": "nfo"        }      }    },    {      "name": "an original title the same as the title says nothing",      "nfo": "old id, a year that is no year",      "table": "film",      "row": {},      "expect": {        "imdb_id": "tt0000303",        "title": "Paper Comets",        "filled_from": {          "imdb_id": "nfo",          "title": "nfo"        }      }    }  ]}