feat(tv-admin): fix action/focus flows, update app title, randomize unsplash, bump 1.0.9+10

This commit is contained in:
dwindown
2026-04-05 14:59:55 +07:00
parent c70a6baf7b
commit 98b8437e87
13 changed files with 144 additions and 131 deletions

View File

@@ -10,12 +10,22 @@ class UnsplashService {
UnsplashService._();
/// Fetches a list of highly compressed landscape URLs based on the given keyword.
Future<List<String>> fetchLandscapeBackgrounds(String keyword) async {
Future<List<String>> fetchLandscapeBackgrounds(
String keyword, {
int page = 1,
}) async {
// Trim keyword and default to 'mosque' if empty
final query = keyword.trim().isEmpty ? 'mosque' : keyword.trim();
// Specifically requesting 'regular' size to fit 1080p elegantly while minimizing RAM overhead.
final url = Uri.parse('$_baseUrl/search/photos?query=$query&orientation=landscape&per_page=20');
final url = Uri.parse('$_baseUrl/search/photos').replace(
queryParameters: {
'query': query,
'orientation': 'landscape',
'per_page': '20',
'page': page.clamp(1, 1000).toString(),
},
);
try {
final response = await http.get(