KoHighlights: Highlight notes not getting synced

Symptom

Some highlights’ notes don’t get synced.

  • ver: 2.3.0.0
  • platform: windows 10

I think this is what happened

  1. Create a highlight with no note on device A.
  2. Sync highlights between device A and B. The highlight is copied to B. These copies have the same datetime.
  3. Add add a note on the highlight on device A (or B, doesn’t matter). Apparently this does NOT update the datetime.
  4. Sync highlights again. KoHighlights sees they have the same datetime and thus doesn’t try to sync the note.

I checked the code and I see it chooses to not sync as long as the highlights have the same datetime.

https://github.com/noembryo/KoHighlights/blob/7504ac002a9114059da10f33aac4892123a8090f/main.py#L2583-L2585

Suggestion

Even if two highlights have the same datetime, I want KoHighlights to check the notes and if one of them is empty the non-empty note should be copied. If both have notes then… maybe show a popup window and let the user resolve the conflict.

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Comments: 38 (29 by maintainers)

Most upvoted comments

Thanks. I just tested and it seems to be working correctly.

If I manage to build one tomorrow (I’m having some strange scripting problems ATM), I’ll upload it here…

Thanks a lot. No KOReader release yet since datetime_updated got added so I’ll build the master and try

The sets being the source and target lists?

Yes. The set of source texts (str) and the set of target texts, specifically.

Perhaps opening an issue about it? But maybe, I should do it anyway… We’ll see

That’d be nice. Or I could do it, too.