From 0b344b6b5f5f2d552949357a84d43eff20c787a0 Mon Sep 17 00:00:00 2001 From: imeepos Date: Wed, 21 Jan 2026 15:20:58 +0800 Subject: [PATCH] debug: add detailed logging for template filtering Add console logs to track template filtering process on home and video pages to diagnose black screen issue. Logs include all preview URL fields and filtering decisions. Co-Authored-By: Claude Opus 4.5 --- app/(tabs)/index.tsx | 8 ++++++++ app/(tabs)/video.tsx | 5 ++++- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/app/(tabs)/index.tsx b/app/(tabs)/index.tsx index 1b1016f..1941a29 100644 --- a/app/(tabs)/index.tsx +++ b/app/(tabs)/index.tsx @@ -144,6 +144,14 @@ export default function HomeScreen() { // 过滤掉视频类型的模板,只显示图片 const previewUrl = (template as any).webpPreviewUrl || template.previewUrl || template.coverImageUrl || `` const isVideo = previewUrl.includes('.mp4') || previewUrl.includes('.mov') || previewUrl.includes('.webm') + console.log(`[HOME PAGE] Filtering ${template.title}:`, { + webpPreviewUrl: (template as any).webpPreviewUrl, + previewUrl: template.previewUrl, + coverImageUrl: template.coverImageUrl, + finalPreviewUrl: previewUrl, + isVideo, + shouldKeep: !isVideo + }) return !isVideo }) : [] diff --git a/app/(tabs)/video.tsx b/app/(tabs)/video.tsx index 4b513bc..14f30ea 100644 --- a/app/(tabs)/video.tsx +++ b/app/(tabs)/video.tsx @@ -169,7 +169,10 @@ export default function VideoScreen() { // 有显示URL且不是视频格式才保留 const shouldKeep = !!displayUrl && !isDisplayVideo - console.log(`Filtering ${item.title}:`, { + console.log(`[VIDEO PAGE] Filtering ${item.title}:`, { + webpHighPreviewUrl: item.webpHighPreviewUrl, + webpPreviewUrl: item.webpPreviewUrl, + previewUrl: item.previewUrl, displayUrl, isDisplayVideo, shouldKeep,