AnkiLPCG icon indicating copy to clipboard operation
AnkiLPCG copied to clipboard

Add Author field

Open cashpw opened this issue 5 years ago • 6 comments

Resolves #20.

cashpw avatar Oct 11 '20 12:10 cashpw

It looks like I didn't set the upgrade path correctly. I'm not seeing the "In order to import..." dialog when starting Anki.

cashpw avatar Oct 11 '20 13:10 cashpw

Ah, I think you've misunderstood how the note type classes work. For a minor upgrade like this one where the change can be made in place without creating a new note type, you don't need to create a new class -- you update the existing class to be the version that a new user would get, then make the upgrade_* routine apply the changes necessary to get the previous version to match the new version.

sobjornstad avatar Oct 11 '20 13:10 sobjornstad

And you need to add an item to the upgrades tuple on the LpcgOne note type to get LPCG to notice that there's a new upgrade available. Details documented in the upgrade_from() method of the ModelData superclass.

sobjornstad avatar Oct 11 '20 13:10 sobjornstad

There; I think I've fixed it up. I tested it locally (at 1.3.0, then upgrading to 1.3.1 by copying the built files into the addon directory) and everything worked.

cashpw avatar Oct 11 '20 15:10 cashpw

@cashweaver Are you going to have a chance to take a look at these requested tweaks soon? I'd like to get a new version out.

sobjornstad avatar Nov 15 '20 15:11 sobjornstad

@sobjornstad Sorry for the delay!

cashpw avatar Dec 16 '20 17:12 cashpw