Currently, when `skip` is true and `deleteExisting` is true the `storeMediaFile` will simply delete the media file.
However, the intended behavior should be to not touch the media file when both conditions are true.
Something in Anki is setting stdout to Null.
This is a problem because Anki itself is writing to it,
particularly when printing warnings about
the deprecated methods that we are using.
This patches Anki using the same method that
the upcoming Anki 2.1.51 is using.
* Import things from `aqt.qt` not `PyQt5`/`PyQt6`
* When testing with Qt6, disable Anki's Qt5 compatibility mode
* Depend on `pytest-anki` that is also Qt version agnostic
Before, pressing the Browse button would only show browser
with the cards or notes corresponding to the currently edited note.
Now, it shows all cards or notes from the dialog history,
in reverse order (last seen on top),
with the currently edited note or its cards selected.
* make previewer use a more generic Adapter to flip through cards;
* return Previewer from `show_preview()` for testing,
* as well as Edit dialog from `open_dialog_and_show_note_with_id`;
* disable/enable `Edit` editor buttons more reliably;
* a few minor changes
Don't start the web server if imported not from inside Anki
Make sure Anki Connect instance is not garbage collected.
This kills the timer that's responsible for the web server.
The method was failing due to Anki API changes.
Also, make it mandatory to call the method with `cardsToo=True`,
since deleting decks on Anki >= 2.1.28 without cards is
no longer supported, and the deprecated `decks.rem()` method
on Anki >= 2.1.45 ignores keyword arguments.
Like Edit Current, but:
* has a Preview button to preview all cards for this note
* has a Browse button to open the browser with these
* has Previous/Back buttons to navigate the history of the dialog
* has no Close button bar
- Chrome now enforces that servers on private networks explicitly
grant access to public websites using a new header
"Access-Control-Allow-Private-Network" that should be sent in
responses to preflight OPTIONS requests.
- This change implements special handling for OPTIONS requests by
sending all the existing CORS headers along with the new
Access-Control-Allow-Private-Network header if private network
access is being requested.
- See https://developer.chrome.com/blog/private-network-access-preflight/
for more info.
Anki deprecated access to the model from the API and the new MockModel
contained no attribute 'cards' leading to an error message being thrown
instead of card ids being returned. This change uses findCards to find
card ids instead of the model so no error is thrown while keeping
guiBrowse functionally equivalent to the previous version.
Closes#277.
* feat: cardsInfo now also returns the modification time
* minor: wrong indentation
* new method: get modification time of cards
* docs: mentions new method cardsModTime
* docs: readme now mentions that modification time is in the result from cardsInfo
Co-authored-by: thiswillbeyourgithub <github@32mail.33mail.comm>
The follow deck configuration actions were updated to conform to Anki’s current deck configuration access. Specifically, `decks.conf` is no longer available.
setDeckConfigId no longer check for existence of configuration id, because the access to the list of config id’s appears to be only through decks; and the config may theoretically be orphaned.
* Added guiCheckDatabase action
This action initiates a check database action in Anki but doesn’t wait for the action to complete before returning.
* Fixed#202 no dconf attribute in saveDeckConfig
Anki manages access to deck configuration differently now. This adapts saveDeckConfig to new style of access.