mirror of
https://github.com/dergigi/boris.git
synced 2025-12-17 06:34:24 +01:00
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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user