diff --git a/app/admin/upload/client.tsx b/app/admin/upload/client.tsx index 36b4f2e..47f27a9 100644 --- a/app/admin/upload/client.tsx +++ b/app/admin/upload/client.tsx @@ -35,6 +35,23 @@ import { import { Switch } from "@/components/ui/switch"; import { Textarea } from "@/components/ui/textarea"; +const YOUTUBE_CATEGORIES = [ + ["1", "Film & Animation"], + ["2", "Autos & Vehicles"], + ["10", "Music"], + ["15", "Pets & Animals"], + ["17", "Sports"], + ["19", "Travel & Events"], + ["20", "Gaming"], + ["22", "People & Blogs"], + ["23", "Comedy"], + ["24", "Entertainment"], + ["25", "News & Politics"], + ["26", "Howto & Style"], + ["27", "Education"], + ["28", "Science & Technology"], +] as const; + export function UploadForm() { const formRef = useRef(null); const uploadRequestRef = useRef(null); @@ -267,8 +284,8 @@ export function UploadForm() { - YouTube uploads default to category 20 (Gaming). You can change it - in the YouTube settings. + YouTube uploads default to 20 — Gaming. The category dropdown shows + the meaning of every supported ID. @@ -308,16 +325,28 @@ export function UploadForm() { Category ID - + onValueChange={(value) => setYoutube((state) => ({ ...state, - categoryId: event.target.value, + categoryId: value, })) } - /> + > + + + + + + {YOUTUBE_CATEGORIES.map(([id, label]) => ( + + {id} — {label} + + ))} + + +