From 316af98a1f4588262432ea450cc89d232e5c8fe5 Mon Sep 17 00:00:00 2001 From: Sultan Iskandar Maulana Date: Sun, 11 Aug 2024 16:05:13 +0700 Subject: [PATCH] Update Kitsu domain to .app --- README.md | 12 ++++++------ api/index.py | 4 ++-- api/schema.json | 2 +- generator/fetcher.py | 2 +- 4 files changed, 10 insertions(+), 10 deletions(-) diff --git a/README.md b/README.md index 1835ec9b8e..693455be50 100644 --- a/README.md +++ b/README.md @@ -525,14 +525,14 @@ GET https://animeapi.my.id/myanimelist/1 instead, you can resolve/convert it to ID using following Kitsu API endpoint: ```http -GET https://kitsu.io/api/edge/anime?filter[slug]= +GET https://kitsu.app/api/edge/anime?filter[slug]= ``` For example, if you want to get anime data from Kitsu with slug `cowboy-bebop`, you can use the following endpoint: ```http -GET https://kitsu.io/api/edge/anime?filter[slug]=cowboy-bebop +GET https://kitsu.app/api/edge/anime?filter[slug]=cowboy-bebop ``` The response will be in JSON format, and you can get the ID from `data[0].id` @@ -642,7 +642,7 @@ GET /rd?from=:platform&id=:mediaid&to=:platform | `annict` | `anc`, `act`, `ac`, `annict.com`, `annict.jp`, `en.annict.com` | | `imdb` | `imdb.com` | | `kaize` | `kz`, `kaize.io` | - | `kitsu` | `kt`, `kts`, `kitsu.io` | + | `kitsu` | `kt`, `kts`, `kitsu.io`, `kitsu.app` | | `livechart` | `lc`, `livechart.me` | | `myanimelist` | `mal`, `myanimelist.net` | | `nautiljon` | `ntj`, `nautiljon.com` | @@ -852,7 +852,7 @@ Add the following schema URI to your JSON file. }, "kitsu": { "title": "Kitsu", - "description": "Kitsu ID in integer, slug not suppported, website: https://kitsu.io/", + "description": "Kitsu ID in integer, slug not suppported, website: https://kitsu.app/", "$ref": "#/definitions/numbernull" }, "livechart": { @@ -1116,7 +1116,7 @@ This project uses multiple sources to compile the data, including: [hato]: https://github.com/Atelier-Shiori/Hato [imdb]: https://imdb.com [ko]: https://github.com/kawaiioverflow -[kts]: https://kitsu.io +[kts]: https://kitsu.app [kz]: https://kaize.io [lc]: https://livechart.me [mal]: https://myanimelist.net @@ -1139,7 +1139,7 @@ This project uses multiple sources to compile the data, including: [f:as]: https://www.google.com/s2/favicons?domain=anisearch.com&sz=16 [f:bgm]: https://www.google.com/s2/favicons?domain=bangumi.tv&sz=16 [f:imdb]: https://www.google.com/s2/favicons?domain=imdb.com&sz=16 -[f:kts]: https://www.google.com/s2/favicons?domain=kitsu.io&sz=16 +[f:kts]: https://www.google.com/s2/favicons?domain=kitsu.app&sz=16 [f:kz]: https://www.google.com/s2/favicons?domain=kaize.io&sz=16 [f:lc]: https://www.google.com/s2/favicons?domain=livechart.me&sz=16 [f:mal]: https://www.google.com/s2/favicons?domain=myanimelist.net&sz=16 diff --git a/api/index.py b/api/index.py index 9350d761cd..559ea87de6 100644 --- a/api/index.py +++ b/api/index.py @@ -303,7 +303,7 @@ def redirect_route(): "annict": "https://annict.com/works/", "imdb": "https://www.imdb.com/title/", "kaize": "https://kaize.io/anime/", - "kitsu": "https://kitsu.io/anime/", + "kitsu": "https://kitsu.app/anime/", "livechart": "https://www.livechart.me/anime/", "myanimelist": "https://myanimelist.net/anime/", "nautiljon": "https://www.nautiljon.com/animes/", @@ -328,7 +328,7 @@ def redirect_route(): "en.annict.com"], "imdb": ["imdb", "imdb.com"], "kaize": ["kaize", "kz", "kaize.io"], - "kitsu": ["kitsu", "kts", "kt", "kitsu.io"], + "kitsu": ["kitsu", "kts", "kt", "kitsu.app", "kitsu.io"], "livechart": ["livechart", "lc", "livechart.me"], "myanimelist": ["myanimelist", "mal", "myanimelist.net"], "nautiljon": ["nautiljon", "ntj", "nautiljon.com"], diff --git a/api/schema.json b/api/schema.json index 2337cba6c2..8f1c2a2478 100644 --- a/api/schema.json +++ b/api/schema.json @@ -1 +1 @@ -{"$schema": "http://json-schema.org/draft-07/schema#","title": "JSON Schema for animeApi base, support for v2 and v3","definitions": {"stringnull": {"anyOf": [{ "type": "string" }, { "type": "null" }],"$comment": "Type: string or null"},"numbernull": {"anyOf": [{ "type": "number" }, { "type": "null" }],"$comment": "Type: number or null"},"trakttype": {"anyOf": [{ "type": "string", "enum": ["movies", "shows"] },{ "type": "null" }],"$comment": "Type: 'movies', 'shows', or null"},"themoviedbtype": {"anyOf": [{ "type": "string", "enum": ["movie", "tv"] },{ "type": "null" }],"$comment": "Type: 'movie', 'tv', or null"},"anime": {"$comment": "Interface: Anime","type": "object","properties": {"title": {"title": "Title","description": "Title of the anime","type": "string"},"anidb": {"title": "aniDB","description": "aniDB ID, website: https://anidb.net/","$ref": "#/definitions/numbernull"},"anilist": {"title": "AniList","description": "AniList ID, website: https://anilist.co/","$ref": "#/definitions/numbernull"},"animeplanet": {"title": "Anime-Planet","description": "Anime-Planet slug, website: https://www.anime-planet.com/","$ref": "#/definitions/stringnull","pattern": "^[a-z0-9\\-]+$"},"anisearch": {"title": "AniSearch","description": "AniSearch ID, website: https://www.anisearch.com/, https://anisearch.de, https://anisearch.it, https://anisearch.es, https://anisearch.fr, https://anisearch.jp","$ref": "#/definitions/numbernull"},"annict": {"title": "Annict","description": "Annict ID, website: https://annict.com/, https://en.annict.com/, https://annict.jp/","$ref": "#/definitions/numbernull"},"imdb": {"title": "IMDb","description": "IMDb ID, website: https://www.imdb.com/","$ref": "#/definitions/stringnull","pattern": "^tt[\\d]+$"},"kaize": {"title": "Kaize","description": "Kaize slug, website: https://kaize.io/","$ref": "#/definitions/stringnull","pattern": "^[a-z0-9\\-]+$"},"kaize_id": {"title": "Kaize ID","description": "Kaize ID in integer format, not recommended as some entry can't be found its ID compared to slug","$ref": "#/definitions/numbernull"},"kitsu": {"title": "Kitsu","description": "Kitsu ID in integer, slug not suppported, website: https://kitsu.io/","$ref": "#/definitions/numbernull"},"livechart": {"title": "LiveChart","description": "LiveChart ID, website: https://www.livechart.me/","$ref": "#/definitions/numbernull"},"myanimelist": {"title": "MyAnimeList","description": "MyAnimeList ID, website: https://myanimelist.net/","$ref": "#/definitions/numbernull"},"nautiljon": {"title": "Nautiljon","description": "Nautiljon slug in plus, website: https://www.nautiljon.com/","$ref": "#/definitions/stringnull"},"nautiljon_id": {"title": "Nautiljon ID","description": "Nautiljon ID in integer format, used internally","$ref": "#/definitions/numbernull"},"notify": {"title": "Notify.moe","description": "Notify.moe Base64 ID, website: https://notify.moe/","$ref": "#/definitions/stringnull","pattern": "^[a-zA-Z0-9\\-\\_]+$"},"otakotaku": {"title": "Otak Otaku","description": "Otak Otaku ID, website: https://otakotaku.com/","$ref": "#/definitions/numbernull"},"shikimori": {"title": "Shikimori/Шикимори","description": "Shikimori ID (nonprefixed), based on MyAnimeList ID. Remove prefix if found on the ID, website: https://shikimori.one/","$ref": "#/definitions/numbernull"},"shoboi": {"title": "Shoboi/Syobocal/しょぼいカレンダー","description": "Shoboi ID, website: http://cal.syoboi.jp/","$ref": "#/definitions/numbernull"},"silveryasha": {"title": "Silveryasha","description": "Silveryasha ID, website: https://db.silveryasha.web.id/","$ref": "#/definitions/numbernull"},"themoviedb": {"title": "The Movie Database (TMDB)","description": "The Movie Database ID, website: https://www.themoviedb.org/","$ref": "#/definitions/numbernull"},"themoviedb_type": {"title": "The Movie Database (TMDB) Type","description": "The Movie Database type, either 'movies' or 'shows'","$ref": "#/definitions/themoviedbtype"},"themoviedb_season": {"title": "The Movie Database (TMDB) Season","description": "The Movie Database season number, only used if themoviedb_type is 'shows', else null","$ref": "#/definitions/numbernull"},"trakt": {"title": "Trakt","description": "Trakt ID, slug not supported, website: https://trakt.tv/","$ref": "#/definitions/numbernull"},"trakt_type": {"title": "Trakt Type","description": "Trakt type, either 'movies' or 'shows'","$ref": "#/definitions/trakttype"},"trakt_season": {"title": "Trakt Season","description": "Trakt season number, only used if trakt_type is 'shows', else null","$ref": "#/definitions/numbernull"}},"required": ["title","anidb","anilist","animeplanet","anisearch","annict","kaize","kitsu","livechart","myanimelist","notify","otakotaku","shikimori","shoboi","silveryasha","trakt","trakt_type","trakt_season"],"additionalProperties": false}},"oneOf": [{"$comment": "Use this schema if you want to validate an array of anime","type": "array","items": { "$ref": "#/definitions/anime" }},{"$comment": "Use this schema if you want to validate an object known in each provider","type": "object","oneOf": [{"$ref": "#/definitions/anime"},{"additionalProperties": {"$ref": "#/definitions/anime"}}]}]} +{"$schema": "http://json-schema.org/draft-07/schema#","title": "JSON Schema for animeApi base, support for v2 and v3","definitions": {"stringnull": {"anyOf": [{ "type": "string" }, { "type": "null" }],"$comment": "Type: string or null"},"numbernull": {"anyOf": [{ "type": "number" }, { "type": "null" }],"$comment": "Type: number or null"},"trakttype": {"anyOf": [{ "type": "string", "enum": ["movies", "shows"] },{ "type": "null" }],"$comment": "Type: 'movies', 'shows', or null"},"themoviedbtype": {"anyOf": [{ "type": "string", "enum": ["movie", "tv"] },{ "type": "null" }],"$comment": "Type: 'movie', 'tv', or null"},"anime": {"$comment": "Interface: Anime","type": "object","properties": {"title": {"title": "Title","description": "Title of the anime","type": "string"},"anidb": {"title": "aniDB","description": "aniDB ID, website: https://anidb.net/","$ref": "#/definitions/numbernull"},"anilist": {"title": "AniList","description": "AniList ID, website: https://anilist.co/","$ref": "#/definitions/numbernull"},"animeplanet": {"title": "Anime-Planet","description": "Anime-Planet slug, website: https://www.anime-planet.com/","$ref": "#/definitions/stringnull","pattern": "^[a-z0-9\\-]+$"},"anisearch": {"title": "AniSearch","description": "AniSearch ID, website: https://www.anisearch.com/, https://anisearch.de, https://anisearch.it, https://anisearch.es, https://anisearch.fr, https://anisearch.jp","$ref": "#/definitions/numbernull"},"annict": {"title": "Annict","description": "Annict ID, website: https://annict.com/, https://en.annict.com/, https://annict.jp/","$ref": "#/definitions/numbernull"},"imdb": {"title": "IMDb","description": "IMDb ID, website: https://www.imdb.com/","$ref": "#/definitions/stringnull","pattern": "^tt[\\d]+$"},"kaize": {"title": "Kaize","description": "Kaize slug, website: https://kaize.io/","$ref": "#/definitions/stringnull","pattern": "^[a-z0-9\\-]+$"},"kaize_id": {"title": "Kaize ID","description": "Kaize ID in integer format, not recommended as some entry can't be found its ID compared to slug","$ref": "#/definitions/numbernull"},"kitsu": {"title": "Kitsu","description": "Kitsu ID in integer, slug not suppported, website: https://kitsu.app/","$ref": "#/definitions/numbernull"},"livechart": {"title": "LiveChart","description": "LiveChart ID, website: https://www.livechart.me/","$ref": "#/definitions/numbernull"},"myanimelist": {"title": "MyAnimeList","description": "MyAnimeList ID, website: https://myanimelist.net/","$ref": "#/definitions/numbernull"},"nautiljon": {"title": "Nautiljon","description": "Nautiljon slug in plus, website: https://www.nautiljon.com/","$ref": "#/definitions/stringnull"},"nautiljon_id": {"title": "Nautiljon ID","description": "Nautiljon ID in integer format, used internally","$ref": "#/definitions/numbernull"},"notify": {"title": "Notify.moe","description": "Notify.moe Base64 ID, website: https://notify.moe/","$ref": "#/definitions/stringnull","pattern": "^[a-zA-Z0-9\\-\\_]+$"},"otakotaku": {"title": "Otak Otaku","description": "Otak Otaku ID, website: https://otakotaku.com/","$ref": "#/definitions/numbernull"},"shikimori": {"title": "Shikimori/Шикимори","description": "Shikimori ID (nonprefixed), based on MyAnimeList ID. Remove prefix if found on the ID, website: https://shikimori.one/","$ref": "#/definitions/numbernull"},"shoboi": {"title": "Shoboi/Syobocal/しょぼいカレンダー","description": "Shoboi ID, website: http://cal.syoboi.jp/","$ref": "#/definitions/numbernull"},"silveryasha": {"title": "Silveryasha","description": "Silveryasha ID, website: https://db.silveryasha.web.id/","$ref": "#/definitions/numbernull"},"themoviedb": {"title": "The Movie Database (TMDB)","description": "The Movie Database ID, website: https://www.themoviedb.org/","$ref": "#/definitions/numbernull"},"themoviedb_type": {"title": "The Movie Database (TMDB) Type","description": "The Movie Database type, either 'movies' or 'shows'","$ref": "#/definitions/themoviedbtype"},"themoviedb_season": {"title": "The Movie Database (TMDB) Season","description": "The Movie Database season number, only used if themoviedb_type is 'shows', else null","$ref": "#/definitions/numbernull"},"trakt": {"title": "Trakt","description": "Trakt ID, slug not supported, website: https://trakt.tv/","$ref": "#/definitions/numbernull"},"trakt_type": {"title": "Trakt Type","description": "Trakt type, either 'movies' or 'shows'","$ref": "#/definitions/trakttype"},"trakt_season": {"title": "Trakt Season","description": "Trakt season number, only used if trakt_type is 'shows', else null","$ref": "#/definitions/numbernull"}},"required": ["title","anidb","anilist","animeplanet","anisearch","annict","kaize","kitsu","livechart","myanimelist","notify","otakotaku","shikimori","shoboi","silveryasha","trakt","trakt_type","trakt_season"],"additionalProperties": false}},"oneOf": [{"$comment": "Use this schema if you want to validate an array of anime","type": "array","items": { "$ref": "#/definitions/anime" }},{"$comment": "Use this schema if you want to validate an object known in each provider","type": "object","oneOf": [{"$ref": "#/definitions/anime"},{"additionalProperties": {"$ref": "#/definitions/anime"}}]}]} diff --git a/generator/fetcher.py b/generator/fetcher.py index 634f3f4de6..e31abad719 100644 --- a/generator/fetcher.py +++ b/generator/fetcher.py @@ -173,7 +173,7 @@ def simplify_aod_data(aod: dict[str, Any]) -> list[dict[str, Any]]: ap_slug = sauce.split("/")[-1] elif sauce.startswith("https://anisearch.com/anime/"): as_id = int(sauce.split("/")[-1]) - elif sauce.startswith("https://kitsu.io/anime/"): + elif sauce.startswith("https://kitsu.io/anime/") or sauce.startswith("https://kitsu.app/anime/") kt_id = int(sauce.split("/")[-1]) elif sauce.startswith("https://livechart.me/anime/"): lc_id = int(sauce.split("/")[-1])