# TMDB Search Fallback + Catalog Cap

## Search Fallback to Stremio Addons

### Problem
Search via TMDB `searchMulti` endpoint returned empty when TMDB API key was missing, invalid, or the service was down. The search only queried TMDB without falling back to Stremio addons.

### Fix: Multi-Source Search Fallback
Added `performAddonSearchFallback()` in `SearchViewModel.kt`:

```kotlin
private fun performSearch(query: String) {
    // Tier 1: TMDB native search
    addonRepository.getCatalogRows(type, "tmdb.search", extra)
        .onSuccess { metas ->
            if (metas.isNotEmpty()) { /* show results */ return }
            // TMDB returned empty → fallback
            performAddonSearchFallback(query, type, extra)
        }
        .onFailure {
            // TMDB failed → fallback
            performAddonSearchFallback(query, type, extra)
        }
}

private suspend fun performAddonSearchFallback(query: String, type: String, extra: Map<String, String>) {
    // Tier 2: Stremio addon native search catalog
    val addonResult = addonRepository.getCatalogRows(type, "search", extra)
    addonResult.onSuccess { /* show addon results */ }
        .onFailure { /* show "No results" error */ }
}
```

**Key:** The Stremio addon protocol uses `/catalog/{type}/search.json?search={query}` for search. This is different from TMDB's `search/multi` endpoint. The fallback uses `catalogId = "search"` which routes through `AddonRepository.getCatalogRows()` Tier 4 (Stremio addons).

## Catalog Item Cap Increase

### Problem
Catalog rows showed at most 20 items per row, limiting the browsing experience.

### Fix
```kotlin
// Before (TmdbCatalogRepository.kt)
private const val PAGE_SIZE = 20
private const val MAX_ITEMS_PER_ROW = 20

// After
private const val PAGE_SIZE = 50
private const val MAX_ITEMS_PER_ROW = 50
```

**Impact:** Genre/provider catalog rows now show up to 50 items instead of 20. TMDB API page size also increased to 50 to fetch more results per request.
