mirror of
https://github.com/go-shiori/shiori.git
synced 2025-01-15 20:37:44 +08:00
fix: title overwritten if user has defiend it (#684)
This commit is contained in:
parent
faa1ae9435
commit
a60f65f24e
1 changed files with 2 additions and 2 deletions
|
@ -237,7 +237,7 @@ func (h *Handler) ApiInsertBookmark(w http.ResponseWriter, r *http.Request, ps h
|
|||
|
||||
if payload.Async {
|
||||
go func() {
|
||||
bookmark, err := downloadBookmarkContent(book, h.DataDir, r, !userHasDefinedTitle, book.Excerpt != "")
|
||||
bookmark, err := downloadBookmarkContent(book, h.DataDir, r, userHasDefinedTitle, book.Excerpt != "")
|
||||
if err != nil {
|
||||
log.Printf("error downloading boorkmark: %s", err)
|
||||
return
|
||||
|
@ -249,7 +249,7 @@ func (h *Handler) ApiInsertBookmark(w http.ResponseWriter, r *http.Request, ps h
|
|||
} else {
|
||||
// Workaround. Download content after saving the bookmark so we have the proper database
|
||||
// id already set in the object regardless of the database engine.
|
||||
book, err = downloadBookmarkContent(book, h.DataDir, r, !userHasDefinedTitle, book.Excerpt != "")
|
||||
book, err = downloadBookmarkContent(book, h.DataDir, r, userHasDefinedTitle, book.Excerpt != "")
|
||||
if err != nil {
|
||||
log.Printf("error downloading boorkmark: %s", err)
|
||||
} else if _, err := h.DB.SaveBookmarks(ctx, false, *book); err != nil {
|
||||
|
|
Loading…
Reference in a new issue