jdlorimer / incremental-reading

Anki add-on providing incremental reading features
https://ankiweb.net/shared/info/935264945
ISC License
216 stars 38 forks source link

Allow for new argument in Anki 2.1.45 #118

Closed AlexRiina closed 1 year ago

AlexRiina commented 3 years ago

In https://github.com/ankitects/anki/commit/49a1580566f403e445d186a4fbf4be1dcb4ff153 Anki gets a new argument for buttonTime. This PR supports both the old and new argument types.

s609078902 commented 3 years ago

seem that it still cannot run on anki 2.1.45

s609078902 commented 3 years ago

Caught exception: Traceback (most recent call last): File "aqt\webview.py", line 538, in handler File "C:\Users\shichuang\AppData\Roaming\Anki2\addons21\935264945\text.py", line 69, in 'getHtmlText()', lambda text: self.create(text, settings) File "C:\Users\shichuang\AppData\Roaming\Anki2\addons21\935264945\text.py", line 128, in create highlight = self._editExtract(newNote, did, settings) File "C:\Users\shichuang\AppData\Roaming\Anki2\addons21\935264945\text.py", line 157, in _editExtract addCards.deckChooser.setDeckName(deckName) AttributeError: 'DeckChooser' object has no attribute 'setDeckName'

Can you fix this attribute error too? thank you so much.

AlexRiina commented 3 years ago

I'm no longer using this plugin for incremental reading, but it looks like instead of selecting the deck by name, the plugin may have to switch to selecting the deck by id via deckchooser.selected_deck_id = did

tvhong commented 1 year ago

Hi @AlexRiina,

Thank you for your contribution! I've made a similar (worse, actually) fix in https://github.com/luoliyan/incremental-reading/commit/4be88a5ad116ca9ce412f7989013167f7448db6c.

Since you mention that you no longer use this plugin for IR, I'll close this PR now. Appreciate your effort.