From 8e6ccda2811a39b1f151148e4addcdc41dd20838 Mon Sep 17 00:00:00 2001 From: Alex Kozack Date: Mon, 11 Oct 2021 10:31:52 +0300 Subject: [PATCH] =?UTF-8?q?feat:=20=D0=94=D0=BE=D0=B1=D0=B0=D0=B2=D0=BB?= =?UTF-8?q?=D0=B5=D0=BD=D1=8B=20=D0=BD=D0=BE=D0=B2=D1=8B=D0=B5=20=D0=B6?= =?UTF-8?q?=D0=B0=D0=BD=D1=80=D1=8B=20`=D0=A0=D0=B0=D0=B1=D0=BE=D1=82?= =?UTF-8?q?=D0=B0`,=20`=D0=93=D1=83=D1=80=D0=BC=D0=B0=D0=BD`,=20`=D0=AD?= =?UTF-8?q?=D1=80=D0=BE=D1=82=D0=B8=D0=BA=D0=B0`?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Новые жанры были добавлены на Шикимори. * Удалены свойства `kind`, `russian`. Эти поля не нужны и не использовались. * Русское название жанра перенесено в поле `name`. * JSON с жанрами минифицирован для лучшей производительности. --- .../Home/AnimeCollection/GenresSelector.vue | 8 +- packages/renderer/src/utils/shikimori-api.ts | 2 - .../renderer/src/utils/shikimori-genres.json | 261 +----------------- 3 files changed, 5 insertions(+), 266 deletions(-) diff --git a/packages/renderer/src/pages/Home/AnimeCollection/GenresSelector.vue b/packages/renderer/src/pages/Home/AnimeCollection/GenresSelector.vue index 2479b46c..a67c0391 100644 --- a/packages/renderer/src/pages/Home/AnimeCollection/GenresSelector.vue +++ b/packages/renderer/src/pages/Home/AnimeCollection/GenresSelector.vue @@ -7,8 +7,8 @@ import ButtonSwitcher from '/@/components/ButtonSwitcher.vue'; const genres: Genre[] = (shikimoriAnimeGenres as Genre[]).sort((a, b) => { - const name1 = a.russian || a.name || a.id; - const name2 = b.russian || b.name || b.id; + const name1 = a.name || a.id; + const name2 = b.name || b.id; return name1 < name2 ? -1 : name1 > name2 ? 1 : 0; }); @@ -54,10 +54,10 @@ const update = (id: number, state: '' | 'include' | 'exclude') => { :states="['', 'include', 'exclude']" :model-value="selectedGenres.get(genre.id) || ''" :group-name="genre.id + genre.name" - :aria-label="genre.russian" + :aria-label="genre.name" @update:modelValue="state => update(genre.id, state)" > - {{ genre.russian }} + {{ genre.name }} diff --git a/packages/renderer/src/utils/shikimori-api.ts b/packages/renderer/src/utils/shikimori-api.ts index 22236392..b728ab29 100644 --- a/packages/renderer/src/utils/shikimori-api.ts +++ b/packages/renderer/src/utils/shikimori-api.ts @@ -281,6 +281,4 @@ export async function saveUserRate(seriesId: number, episodes: number): Promise< export interface Genre { id: number; name: string; - russian: string; - kind: 'anime'; } diff --git a/packages/renderer/src/utils/shikimori-genres.json b/packages/renderer/src/utils/shikimori-genres.json index 2312174a..34d7dca6 100644 --- a/packages/renderer/src/utils/shikimori-genres.json +++ b/packages/renderer/src/utils/shikimori-genres.json @@ -1,260 +1 @@ -[ - { - "id": 8, - "name": "Drama", - "russian": "Драма", - "kind": "anime" - }, - { - "id": 11, - "name": "Game", - "russian": "Игры", - "kind": "anime" - }, - { - "id": 40, - "name": "Psychological", - "russian": "Психологическое", - "kind": "anime" - }, - { - "id": 2, - "name": "Adventure", - "russian": "Приключения", - "kind": "anime" - }, - { - "id": 19, - "name": "Music", - "russian": "Музыка", - "kind": "anime" - }, - { - "id": 1, - "name": "Action", - "russian": "Экшен", - "kind": "anime" - }, - { - "id": 4, - "name": "Comedy", - "russian": "Комедия", - "kind": "anime" - }, - { - "id": 6, - "name": "Demons", - "russian": "Демоны", - "kind": "anime" - }, - { - "id": 39, - "name": "Police", - "russian": "Полиция", - "kind": "anime" - }, - { - "id": 29, - "name": "Space", - "russian": "Космос", - "kind": "anime" - }, - { - "id": 9, - "name": "Ecchi", - "russian": "Этти", - "kind": "anime" - }, - { - "id": 10, - "name": "Fantasy", - "russian": "Фэнтези", - "kind": "anime" - }, - { - "id": 12, - "name": "Hentai", - "russian": "Хентай", - "kind": "anime" - }, - { - "id": 13, - "name": "Historical", - "russian": "Историческое", - "kind": "anime" - }, - { - "id": 14, - "name": "Horror", - "russian": "Ужасы", - "kind": "anime" - }, - { - "id": 16, - "name": "Magic", - "russian": "Магия", - "kind": "anime" - }, - { - "id": 18, - "name": "Mecha", - "russian": "Меха", - "kind": "anime" - }, - { - "id": 20, - "name": "Parody", - "russian": "Пародия", - "kind": "anime" - }, - { - "id": 21, - "name": "Samurai", - "russian": "Самураи", - "kind": "anime" - }, - { - "id": 22, - "name": "Romance", - "russian": "Романтика", - "kind": "anime" - }, - { - "id": 23, - "name": "School", - "russian": "Школа", - "kind": "anime" - }, - { - "id": 27, - "name": "Shounen", - "russian": "Сёнэн", - "kind": "anime" - }, - { - "id": 30, - "name": "Sports", - "russian": "Спорт", - "kind": "anime" - }, - { - "id": 32, - "name": "Vampire", - "russian": "Вампиры", - "kind": "anime" - }, - { - "id": 33, - "name": "Yaoi", - "russian": "Яой", - "kind": "anime" - }, - { - "id": 34, - "name": "Yuri", - "russian": "Юри", - "kind": "anime" - }, - { - "id": 35, - "name": "Harem", - "russian": "Гарем", - "kind": "anime" - }, - { - "id": 28, - "name": "Shounen Ai", - "russian": "Сёнэн-ай", - "kind": "anime" - }, - { - "id": 36, - "name": "Slice of Life", - "russian": "Повседневность", - "kind": "anime" - }, - { - "id": 26, - "name": "Shoujo Ai", - "russian": "Сёдзё-ай", - "kind": "anime" - }, - { - "id": 43, - "name": "Josei", - "russian": "Дзёсэй", - "kind": "anime" - }, - { - "id": 37, - "name": "Supernatural", - "russian": "Сверхъестественное", - "kind": "anime" - }, - { - "id": 41, - "name": "Thriller", - "russian": "Триллер", - "kind": "anime" - }, - { - "id": 24, - "name": "Sci-Fi", - "russian": "Фантастика", - "kind": "anime" - }, - { - "id": 25, - "name": "Shoujo", - "russian": "Сёдзё", - "kind": "anime" - }, - { - "id": 31, - "name": "Super Power", - "russian": "Суперсила", - "kind": "anime" - }, - { - "id": 38, - "name": "Military", - "russian": "Военное", - "kind": "anime" - }, - { - "id": 7, - "name": "Mystery", - "russian": "Детектив", - "kind": "anime" - }, - { - "id": 15, - "name": "Kids", - "russian": "Детское", - "kind": "anime" - }, - { - "id": 3, - "name": "Cars", - "russian": "Машины", - "kind": "anime" - }, - { - "id": 17, - "name": "Martial Arts", - "russian": "Боевые искусства", - "kind": "anime" - }, - { - "id": 5, - "name": "Dementia", - "russian": "Безумие", - "kind": "anime" - }, - { - "id": 42, - "name": "Seinen", - "russian": "Сэйнэн", - "kind": "anime" - } -] +[{"id":8,"name":"Драма"},{"id":11,"name":"Игры"},{"id":40,"name":"Психологическое"},{"id":2,"name":"Приключения"},{"id":19,"name":"Музыка"},{"id":543,"name":"Гурман"},{"id":1,"name":"Экшен"},{"id":4,"name":"Комедия"},{"id":6,"name":"Демоны"},{"id":39,"name":"Полиция"},{"id":29,"name":"Космос"},{"id":9,"name":"Этти"},{"id":10,"name":"Фэнтези"},{"id":12,"name":"Хентай"},{"id":13,"name":"Историческое"},{"id":14,"name":"Ужасы"},{"id":16,"name":"Магия"},{"id":18,"name":"Меха"},{"id":20,"name":"Пародия"},{"id":21,"name":"Самураи"},{"id":22,"name":"Романтика"},{"id":23,"name":"Школа"},{"id":539,"name":"Эротика"},{"id":27,"name":"Сёнэн"},{"id":30,"name":"Спорт"},{"id":32,"name":"Вампиры"},{"id":33,"name":"Яой"},{"id":34,"name":"Юри"},{"id":35,"name":"Гарем"},{"id":28,"name":"Сёнэн-ай"},{"id":36,"name":"Повседневность"},{"id":26,"name":"Сёдзё-ай"},{"id":43,"name":"Дзёсэй"},{"id":37,"name":"Сверхъестественное"},{"id":41,"name":"Триллер"},{"id":24,"name":"Фантастика"},{"id":25,"name":"Сёдзё"},{"id":31,"name":"Суперсила"},{"id":38,"name":"Военное"},{"id":7,"name":"Детектив"},{"id":15,"name":"Детское"},{"id":3,"name":"Машины"},{"id":17,"name":"Боевые искусства"},{"id":5,"name":"Безумие"},{"id":541,"name":"Работа"},{"id":42,"name":"Сэйнэн"}]