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 <noreply@anthropic.com>
This commit is contained in:
parent
a344410374
commit
0b344b6b5f
|
|
@ -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
|
||||
})
|
||||
: []
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
|
|
|
|||
Loading…
Reference in New Issue