Skip to content
This repository has been archived by the owner on Mar 26, 2023. It is now read-only.

Commit

Permalink
feat: Добавлены новые жанры Работа, Гурман, Эротика
Browse files Browse the repository at this point in the history
Новые жанры были добавлены на Шикимори.

* Удалены свойства `kind`, `russian`. Эти поля не нужны и не использовались.
* Русское название жанра перенесено в поле `name`.
* JSON с жанрами минифицирован для лучшей производительности.
  • Loading branch information
cawa-93 committed Oct 11, 2021
1 parent 8134afe commit 8e6ccda
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 266 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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;
});
Expand Down Expand Up @@ -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 }}
</button-switcher>
</section>
</template>
Expand Down
2 changes: 0 additions & 2 deletions packages/renderer/src/utils/shikimori-api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -281,6 +281,4 @@ export async function saveUserRate(seriesId: number, episodes: number): Promise<
export interface Genre {
id: number;
name: string;
russian: string;
kind: 'anime';
}
261 changes: 1 addition & 260 deletions packages/renderer/src/utils/shikimori-genres.json
Original file line number Diff line number Diff line change
@@ -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":"Сэйнэн"}]

0 comments on commit 8e6ccda

Please sign in to comment.