Comments (4)
i notice on master it is
anki-addons/add_note_id/__init__.py
Lines 94 to 97 in 5e56601
but the code as downloaded from the anki addons page is
def onLoadNote(self, *args, **kwargs):
for f in self.note.keys():
if f == config["NoteIdFieldName"] and not self.note[f]:
self.note[f] = str(self.note.id - int(15e11))
when i manually edit the extension locally to use uuid
it works
from anki-addons.
I'm using anki 2.1.29. It always sets the note id to -1500000000000
from anki-addons.
Replacing the file __init__.py
in the add-ons folder with the file from this repo fixed the problem for me.
from anki-addons.
i notice on master it is
anki-addons/add_note_id/__init__.py
Lines 94 to 97 in 5e56601
but the code as downloaded from the anki addons page is
def onLoadNote(self, *args, **kwargs): for f in self.note.keys(): if f == config["NoteIdFieldName"] and not self.note[f]: self.note[f] = str(self.note.id - int(15e11))
when i manually edit the extension locally to use
uuid
it works
If you want the old note id behaviour, instead of the uuid behaviour,
the fix for that is to check that the note id isn't - int(15e11) before adding anything.
I removed the subtraction, because for my purposes I need the note id to be the actual note id,
so in my case it was auto-filling with 0, because when you first open the add note form, there is no id yet.
I now have
if self.note.id != 0:
self.note[f] = str(self.note.id)
in the onLoadNote section to avoid that, and the correct note id fills in next time it is opened.
from anki-addons.
Related Issues (20)
- Replay button plugin shows text instead of image HOT 3
- Japanese - Nothing Downloaded HOT 9
- "remap replay audio button to plus key" and "More shortcuts" HOT 1
- deck_name_in_title 2.1 HOT 4
- [feature request] replay button styling in add-on not in template HOT 7
- Addressing potential Cookie Monster incompatibilities with other add-ons
- Make the way the nid in "Add Note ID" is calculated optional HOT 2
- Recently not working for japanese, but worked perfectly a few days ago. HOT 3
- I get this error after installing the addon HOT 3
- Change the place of button HOT 1
- Cannot replay from the start sometimes if a field has many audio clips HOT 2
- Replay buttons on card and 2.1.20 HOT 9
- downloadaudio Error on Anki 2.1.20 Beta 5 HOT 2
- add_note_id: importing new cards into a note with Note ID field
- make note-id a real uuid HOT 4
- Changing note id to uuid breaks compatibility with linking HOT 1
- Replay buttons on card plugin not working for Anki 2.1.15 HOT 1
- Not support 2.1.49
- 插件启动失败
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from anki-addons.