fix search/filter bugs in game and TV libraries
- Game series: filter now checks child games for both search and tag matches instead of always passing series through - TV episodes: tag selector no longer closes after picking a tag - TV episodes: filter panel now filters episodes within a season view - TV series list: series now appear when any of their episodes match the active tag filter (via new /api/tv/series-episode-tags endpoint backed by media_items) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
14
src/app/api/tv/series-episode-tags/route.ts
Normal file
14
src/app/api/tv/series-episode-tags/route.ts
Normal file
@@ -0,0 +1,14 @@
|
||||
import { NextRequest, NextResponse } from 'next/server'
|
||||
import { getSeriesEpisodeTagMap } from '@/lib/tags'
|
||||
import { requireLibraryAccess } from '@/lib/auth'
|
||||
|
||||
export async function GET(request: NextRequest) {
|
||||
const { searchParams } = request.nextUrl
|
||||
const libraryId = searchParams.get('libraryId')
|
||||
if (!libraryId) return NextResponse.json({ error: 'libraryId required' }, { status: 400 })
|
||||
|
||||
const auth = await requireLibraryAccess(request, libraryId)
|
||||
if (auth instanceof NextResponse) return auth
|
||||
|
||||
return NextResponse.json(getSeriesEpisodeTagMap(libraryId))
|
||||
}
|
||||
Reference in New Issue
Block a user