omnivore-app / obsidian-omnivore

Obsidian plugin to fetch articles and highlights from Omnivore
MIT License
726 stars 39 forks source link

[Bug] Duplicate item on Obsidian after syncing an already synced item #143

Closed mathisgauthey closed 6 months ago

mathisgauthey commented 9 months ago

Hi there.

I noticed that if I happen to save a link that I already saved in the past and that was already synced to Obsidian, the mere fact of having it come back to the Inbox from the Archives and triggering another sync will create a duplicate.

Explanation and how to reproduce :

  1. Save a link
  2. Sync highlights to obsidian -> Article came to obsidian
  3. Archive it
  4. Sync highlights to obsidian -> The link now has an archived state tag
  5. Save the like once again because you forgot you had it.
  6. Sync highlights to obsidian -> You now have a duplicate file nammed article_name 1 that has an Inbox tag.

Here are my frontmatter settings :

title,author,tags,state,date_published,date_saved,date_read,date_archived

Here are my sync setting :

# {{{title}}}

#Omnivore

[Read on Omnivore]({{{omnivoreUrl}}})
[Read Original]({{{originalUrl}}})

{{#note}}
## Notes

{{{note}}}
{{/note}}

{{#highlights.length}}
## Highlights

{{#highlights}}
> {{{text}}} [⤴️]({{{highlightUrl}}}) {{#labels}} #{{name}} {{/labels}}
{{#note}}

{{{note}}}
{{/note}}

{{/highlights}}
{{/highlights.length}}
## Webpage

{{{content}}}
sywhb commented 6 months ago

Hey @mathisgauthey , sorry for the late reply.

I guess it has something with the link because I couldn't replicate the issue following your steps with several links.

Does it happen to all the links you save? Would you mind sharing the link?

mathisgauthey commented 6 months ago

Hey @mathisgauthey , sorry for the late reply.

I guess it has something with the link because I couldn't replicate the issue following your steps with several links.

Does it happen to all the links you save? Would you mind sharing the link?

Hey there, thanks for the reply. I did not encounter it again yet. I'll clean my links on obsidian and try to reproduce once again in the following days. If I can't, I'll close the issue. I'll let you know.

Edit : Couldn't reproduce, I don't know what changed on my end if anything. So I'll close but will try to remember to monitor it as needed