autoEaseFactor icon indicating copy to clipboard operation
autoEaseFactor copied to clipboard

Update for 2.1.45 and V3 scheduler?

Open PHZCosta opened this issue 3 years ago • 9 comments

I love this add-on, but I imagine it's broken by the new 2.1.45 update that introduced the new scheduler. There's a plan to update it?

PHZCosta avatar Aug 03 '21 22:08 PHZCosta

I haven't had time to devote to redevelopment, with the size of the changes to Anki I think it will need to be rebuilt from scratch. I'm running on 2.1.47, but with v3 off, if v3 becomes mandatory it would break this.

I am worried about this and encouraging forks on AnkiWeb.

brownbat avatar Sep 28 '21 01:09 brownbat

@brownbat are you sure that autoeasefactor doesn't work with the v3 scheduler? I haven't tried it but in my understanding autoeasefactor changes the due date after the scheduler sets one, which shouldn't cause any problems?

RisingOrange avatar Sep 28 '21 09:09 RisingOrange

@brownbat are you sure that autoeasefactor doesn't work with the v3 scheduler? I haven't tried it but in my understanding autoeasefactor changes the due date after the scheduler sets one, which shouldn't cause any problems?

Yeah v3 breaks it. It doesn't save the new ease.

tkozybski avatar Nov 30 '21 15:11 tkozybski

I think I've made it work by trial and error, but it needs more testing. card.flush() was needed but you can't do that in reviewer_will_end hook because it'll throw an error (sometimes, I don't know what it's based on). We'll use different hook instead. All changes in autoEaseFactor.py

def adjust_factor(reviewer=reviewer.Reviewer,
                  card=mw.reviewer.card, ease=int):
    assert card is not None
    new_answer = ease
    if card.queue == 2 or not reviews_only:
        card.factor = suggested_factor(card, new_answer)
        card.flush()
    if stats_enabled:
        display_stats(new_answer)

gui_hooks.reviewer_did_answer_card.append(adjust_factor)

Few lines of code needs to be commented because it counts the answers twice now:

if new_answer is not None:
       card_settings['review_list'].append(new_answer)

and

if new_answer:
       rep_list.append(new_answer)

tkozybski avatar Nov 30 '21 17:11 tkozybski

Yeah, it would be great if it could be ported to V3. I'm still in 2.1.43 because I don't want to lose this add-on. @brownbat , do you think @tkozybski idea could be implemented?

PHZCosta avatar Nov 30 '21 23:11 PHZCosta

I think I've made it work by trial and error, but it needs more testing.

Just curious if this testing was continued and if you got it working on V3? Thanks!

fjaieohfaufn avatar Mar 15 '22 02:03 fjaieohfaufn

Not really, I've abandoned this add-on.

tkozybski avatar Mar 18 '22 07:03 tkozybski

Not really, I've abandoned this add-on.

How come you abandoned the addon?

Willz7 avatar Apr 13 '22 13:04 Willz7

Auto Ease Factor seems to change the ease for me even with v3.

I'm still in 2.1.43 because I don't want to lose this add-on.

You can update without worries, you'll still be on v2. v3 must be enabled manually. And the Anki FAQ say you can switch back and forth.

galantra avatar Sep 28 '22 16:09 galantra