trgkanki / remaining_time

GNU Affero General Public License v3.0
18 stars 3 forks source link

Make compatible with AnkiMobile & Anki-Android #1

Closed phu54321 closed 4 years ago

phu54321 commented 4 years ago

Since this program only needs SVG and HTML support to work correctly, I think that the addon may be injected directly into card formats. When the addon is installed, the addon will inject its code to every exiting model's HTML & CSS.

Problem

phu54321 commented 4 years ago

Not possible at the moment

phu54321 commented 4 years ago

Compativility w/ ankidroid - possible resource

https://www.reddit.com/r/Anki/comments/gtcysk/how_should_implement_progress_bar_in_ankidroid/?utm_medium=android_app&utm_source=share

stale[bot] commented 4 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

phu54321 commented 4 years ago

Awesomely this has been fixed. Really. :)

TowelSniffer commented 4 years ago

I can see this issue has been closed but I wanted to ask if this in fact works for other people. I tried enabling the config setting but when I edit from manage notetypes a card I get this error message

Debug info:
Anki 2.1.34 (8af8f565) Python 3.8.0 Qt 5.15.1 PyQt 5.15.1
Platform: Windows 10
Flags: frz=True ao=True sv=2
Add-ons, last update check: 2020-09-23 21:33:47

Caught exception:
Traceback (most recent call last):
  File "aqt\webview.py", line 37, in cmd
  File "aqt\webview.py", line 123, in _onCmd
  File "aqt\webview.py", line 541, in _onBridgeCmd
  File "aqt\gui_hooks.py", line 2959, in __call__
  File "C:\Users\fionn\AppData\Roaming\Anki2\addons21\1508357010\utils\JSCallable.py", line 29, in _onBridgeMessage
    ret = func(*argList)
  File "C:\Users\fionn\AppData\Roaming\Anki2\addons21\1508357010\jsapi\remainingCardCount.py", line 14, in getCurrentRemainingCardCount
    counts = list(mw.col.sched.counts(reviewer.card))
  File "anki\schedv2.py", line 162, in counts
AttributeError: 'Scheduler' object has no attribute 'newCount'

I can see that it tries to load <!-- # 2eecab49dc1f9618 --><script src="_remainingtime.min.js"></script><!-- / 2eecab49dc1f9618 --> within the note templates but it wont work on ankidroid for me.

I have other addons installed so it may just be a conflict.

edit: removing and reinstalling the addon removes this error but even when the scripts loaded in ankidroid it still doesn't work

phu54321 commented 4 years ago

Wtf. this seems like a bug in Anki.

phu54321 commented 4 years ago

Addon not working on ankidroid. Bug reproduced