Closed HarshIceHummer closed 7 years ago
Thanks for reporting this issue. Unfortunately, it won't be fixed until Anki 2.1.0 release that introduces the new hook "showDeckOptions". However, the other add-on will need to be fixed too. There isn't any other place where you can find it, but for the meantime, you can edit "Clear Field Formatting HTML" add-on script in your Anki. Go to Tools - Add-ons - Clear Field Formatting HTML - Edit... Find the following piece of code:
def showOptions(self, did):
m = QMenu(self.mw)
a = m.addAction(_("Rename"))
a.connect(a, SIGNAL("triggered()"), lambda did=did: self._rename(did))
a = m.addAction(_("Options"))
a.connect(a, SIGNAL("triggered()"), lambda did=did: self._options(did))
a = m.addAction(_("Export"))
a.connect(a, SIGNAL("triggered()"), lambda did=did: self._export(did))
a = m.addAction(_("Delete"))
a.connect(a, SIGNAL("triggered()"), lambda did=did: self._delete(did))
#
runHook("deckHooker", self, did, m)
#
m.exec_(QCursor.pos())
And replace it with:
def showOptions(self, did):
m = QMenu(self.mw)
a = m.addAction(_("Rename"))
a.connect(a, SIGNAL("triggered()"), lambda did=did: self._rename(did))
a = m.addAction(_("Options"))
a.connect(a, SIGNAL("triggered()"), lambda did=did: self._options(did))
a = m.addAction(_("Export"))
a.connect(a, SIGNAL("triggered()"), lambda did=did: self._export(did))
a = m.addAction(_("Delete"))
a.connect(a, SIGNAL("triggered()"), lambda did=did: self._delete(did))
# Media Internalizer
a = m.addAction("Internalize Media")
a.connect(a, SIGNAL("triggered()"), lambda did=did: self._internalize(did))
#
runHook("deckHooker", self, did, m)
#
m.exec_(QCursor.pos())
Save and restart Anki.
Thank you for replying. However, the addon is still not working. It's throwing this error now.
Traceback (most recent call last):
File "C:\Users\Mahesh\Documents\Anki\addons_Clear_Field_Formatting_HTML.py", line 390, in
This looks like a server or connection problem.
Raised if a server responds with a HTTP status code that we don’t understand.
Does this error appear on one specific note or all of them? If it doesn't work for all notes, check your network and proxy settings.
Update: I fixed the script, so it doesn't crash Anki when this exception occurs. Please, reinstall the add-on (code 221033553).
I have used your addon previously and it worked great until I installed another addon from https://ankiweb.net/shared/info/1114708966 .
After installing this addon, the menu item "Internalize Media" is no longer available on clicking the Deck Options button. Is there somewhere else I can find it?