Pleco Anki integration adds duplicates

Discussion in 'Pleco for Android' started by Marovelo, Nov 19, 2016.

  1. Marovelo

    Marovelo Member

    I think I found a bug in the Pleco AnkiDroid integration.

    I have two decks in Anki and so I configured two card models in Pleco:
    1) The simple (German: "Einfach") one with duplicate checking both checked; front side sc and tc; back side df and py; Pleco Header unchecked; examples unchecked
    2) The simple one or two directions (German: "Einfach eine oder zwei Richtungen") one with duplicate checking both unchecked; front side df; examples unchecked; back side py; Pleco Header unchecked

    I have 1) set as default card model.

    When I want to add a vocabulary I do the following:

    1. I choose "add to Flashcards". This adds the flashcard as described in 1) just fine.

    2. I choose again "add to Flashcards" and a dialog appears in which I choose "new card". I choose 2) as card model, select the oher Anki deck and click add card. This adds one card to deck 1) and two cards to deck 2).
    I would expect that this just adds one card to deck 2)

    I am using current version of Pleco and Ankidroid from the PlayStore.

    Let me know if you neeed any further information.

    Thanks in advance for any help!
  2. mikelove

    mikelove 皇帝 Staff Member

    Thanks for your post.

    We haven't been able to reproduce this so far - our best guess about what's causing it is that AnkiDroid is refusing to delete the temporary cards that we create in order to get an HTML preview of your new card. (slightly odd that we have to do that at all, but it's part of the official API + sample)

    If you cancel that 'add to flashcards,' are the new cards still created? That would strongly suggest that our guess is correct + it's not deleting those temporary cards.
  3. Marovelo

    Marovelo Member

    Thank you for the quick reply!

    I tried what you suggested: I repeated the first step from my post above and then chose again "add to Flashcards". From there: "new card"-> "cancel".
    The behaviour is as you said: The cards still get added. So I guess you are right with your temp cards theory.
    Any ideas what I could do about it?

    What I forgot to mention before: Adding cards to AnkiDroid worked just fine until I updated my phone with a new Android version. I had Pleco backuped with the app Titanium Backup and then copied it back from this backup to the new operating system. Everything seemed to work fine, that's why I only come up with this now.
    Sorry, propbably should have mentioned that earlier. :( Could this have any influence?
  4. mikelove

    mikelove 皇帝 Staff Member

    It might be that Pleco's permissions to access AnkiDroid were screwed up in some way by that reinstall, yes - their permission checker is stricter about deletion than about card creation, so AnkiDroid might be cheerfully letting us create the card but not letting us delete it. Most reliable fix for that would be to uninstall and then reinstall Pleco.
  5. Marovelo

    Marovelo Member

    Reinstalling Pleco worked for me. Behaviour is now as expected. Thanks a lot!

Share This Page