fix: extract description from web bookmark content field

- Web bookmarks (kind:39701) store description in content field, not summary tag
- Update linksFromBookmarks.ts to check content field for web bookmarks
- Maintain backward compatibility with regular bookmarks using summary tag
- Fixes description display for web bookmarks in Links tab
This commit is contained in:
Gigi
2025-10-25 01:19:07 +02:00
parent 6fd40f2ff6
commit 1282e778c6

View File

@@ -40,6 +40,11 @@ export async function deriveLinksFromBookmarks(bookmarks: Bookmark[]): Promise<R
const summary = bookmark.tags.find(t => t[0] === 'summary')?.[1]
const image = bookmark.tags.find(t => t[0] === 'image')?.[1]
// For web bookmarks (kind:39701), description is stored in content field, not summary tag
const description = bookmark.kind === KINDS.WebBookmark && bookmark.content
? bookmark.content.trim()
: summary
// Create ReadItem for each unique URL
for (const url of [...new Set(urls)]) {
if (!linksMap.has(url)) {
@@ -49,7 +54,7 @@ export async function deriveLinksFromBookmarks(bookmarks: Bookmark[]): Promise<R
type: 'external',
url,
title: title || fallbackTitleFromUrl(url),
summary,
summary: description,
image,
readingProgress: 0,
readingTimestamp: bookmark.created_at ?? undefined