chore: update Angular cache and TypeScript build info
This commit is contained in:
@@ -217,7 +217,12 @@ export class YoutubeApiService {
|
||||
chart: 'mostPopular',
|
||||
regionCode: String(region),
|
||||
maxResults: '24',
|
||||
// Optimize quota usage: only get essential parts
|
||||
part: 'snippet,contentDetails,statistics',
|
||||
// Add safeSearch for better content filtering
|
||||
safeSearch: 'moderate',
|
||||
// Video category for trending (Music = 10, Gaming = 20, etc.)
|
||||
videoCategoryId: '0', // All categories
|
||||
key: String(key),
|
||||
});
|
||||
|
||||
@@ -371,11 +376,15 @@ export class YoutubeApiService {
|
||||
if (!key) return of({ items: [], nextCursor: null });
|
||||
const params = new URLSearchParams({
|
||||
type: 'video',
|
||||
part: 'snippet',
|
||||
// Reduce initial page size to 12 to limit payload; unit cost per call remains but fewer follow-up calls
|
||||
part: 'snippet,contentDetails,statistics',
|
||||
// Optimize for quota usage: reduce initial results
|
||||
maxResults: '12',
|
||||
q: String(query),
|
||||
regionCode: String(region),
|
||||
// Add safeSearch for better content filtering
|
||||
safeSearch: 'moderate',
|
||||
// Video category filter for better relevance
|
||||
videoCategoryId: '0', // All categories
|
||||
key: String(key),
|
||||
});
|
||||
// Prefer results matching user's language when available
|
||||
@@ -952,6 +961,8 @@ export class YoutubeApiService {
|
||||
part: 'contentDetails,statistics',
|
||||
id: ids.join(','),
|
||||
maxResults: String(Math.min(50, ids.length)),
|
||||
// Add safeSearch for consistency
|
||||
safeSearch: 'moderate',
|
||||
});
|
||||
return this.fetchYouTube('/youtube/v3/videos', params, apiKey).pipe(
|
||||
map((res: any) => Array.isArray(res?.items) ? res.items : []),
|
||||
|
||||
Reference in New Issue
Block a user