add more categories from jackett

This commit is contained in:
2026-02-19 17:19:58 +03:00
parent e293f68c4a
commit bedb50d524
2 changed files with 53 additions and 20 deletions

View File

@@ -18,6 +18,7 @@ import { humanFileSize } from "../utils/humanFileSize";
import { useDeleteTorrentMutation } from "../api/useDeleteTorrentMutation";
import { useRefreshItemMutation } from "../api/useRefreshItemMutation";
import { Loader } from "./Loader";
import { categories } from "../lib/categories";
dayjs.extend(relativeTime);
@@ -196,24 +197,5 @@ export const Item = ({ item }: ItemProps) => {
};
const formatCategory = (category: number): string => {
switch (category) {
case 1000:
return "Console";
case 2000:
return "Movies";
case 3000:
return "Audio";
case 4000:
return "PC";
case 5000:
return "TV";
case 6000:
return "XXX";
case 7000:
return "Books";
case 8000:
return "Other";
default:
return "";
}
return categories[category as keyof typeof categories] || "";
};

View File

@@ -1,10 +1,61 @@
export const categories = {
1000: "Console",
1010: "Console/NDS",
1020: "Console/PSP",
1030: "Console/Wii",
1040: "Console/XBox",
1050: "Console/XBox 360",
1080: "Console/PS3",
1090: "Console/Other",
1110: "Console/3DS",
1120: "Console/PS Vita",
1180: "Console/PS4",
2000: "Movies",
2010: "Movies/Foreign",
2020: "Movies/Other",
2030: "Movies/SD",
2040: "Movies/HD",
2045: "Movies/UHD",
2060: "Movies/3D",
2070: "Movies/DVD",
3000: "Audio",
3010: "Audio/MP3",
3020: "Audio/Video",
3030: "Audio/Audiobook",
3040: "Audio/Lossless",
3050: "Audio/Other",
4000: "PC",
4010: "PC/0day",
4030: "PC/Mac",
4040: "PC/Mobile-Other",
4050: "PC/Games",
4060: "PC/Mobile-IOS",
4070: "PC/Mobile-Android",
5000: "TV",
5020: "TV/Foreign",
5030: "TV/SD",
5040: "TV/HD",
5045: "TV/UHD",
5050: "TV/Other",
5060: "TV/Sport",
5070: "TV/Anime",
5080: "TV/Documentary",
6000: "XXX",
6010: "XXX/DVD",
6060: "XXX/ImageSet",
7000: "Books",
7010: "Books/Mags",
7020: "Books/EBook",
7030: "Books/Comics",
7040: "Books/Technical",
7050: "Books/Other",
8000: "Other",
8010: "Other/Misc",
};