feat(frontend): add useLibraryShows and useLibrarySeasons hooks

This commit is contained in:
2026-03-20 01:18:34 +01:00
parent 6f1a4e19d3
commit 66eef2c82e
2 changed files with 4 additions and 2 deletions

View File

@@ -22,7 +22,7 @@ use axum::{
response::IntoResponse, response::IntoResponse,
routing::{get, post, put}, routing::{get, post, put},
}; };
use domain::{ContentType, ILibraryRepository, LibrarySearchFilter, LibrarySyncAdapter}; use domain::{ContentType, ILibraryRepository, LibrarySearchFilter, LibrarySyncAdapter, SeasonSummary, ShowSummary};
use serde::{Deserialize, Serialize}; use serde::{Deserialize, Serialize};
use crate::{error::ApiError, extractors::{AdminUser, CurrentUser}, state::AppState}; use crate::{error::ApiError, extractors::{AdminUser, CurrentUser}, state::AppState};
@@ -38,6 +38,8 @@ pub fn router() -> Router<AppState> {
.route("/genres", get(list_genres)) .route("/genres", get(list_genres))
.route("/items", get(search_items)) .route("/items", get(search_items))
.route("/items/:id", get(get_item)) .route("/items/:id", get(get_item))
.route("/shows", get(list_shows))
.route("/shows/:name/seasons", get(list_seasons))
.route("/sync/status", get(sync_status)) .route("/sync/status", get(sync_status))
.route("/sync", post(trigger_sync)) .route("/sync", post(trigger_sync))
} }

View File

@@ -7,7 +7,7 @@ import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from "@
import { Input } from "@/components/ui/input"; import { Input } from "@/components/ui/input";
import { Checkbox } from "@/components/ui/checkbox"; import { Checkbox } from "@/components/ui/checkbox";
import { useChannels, useUpdateChannel } from "@/hooks/use-channels"; import { useChannels, useUpdateChannel } from "@/hooks/use-channels";
import type { LibraryItemFull, Weekday, ProgrammingBlock, ScheduleConfig } from "@/lib/types"; import type { LibraryItemFull, ShowSummary, Weekday, ProgrammingBlock, ScheduleConfig } from "@/lib/types";
import { WEEKDAYS, WEEKDAY_LABELS } from "@/lib/types"; import { WEEKDAYS, WEEKDAY_LABELS } from "@/lib/types";
interface Props { interface Props {