aqt.mediasrv#
Attributes#
Classes#
Enum where members are also (and must be) ints |
|
A class that represents a thread of control. |
Functions#
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Module Contents#
- aqt.mediasrv.logger#
- aqt.mediasrv.app#
- aqt.mediasrv.DynamicRequest#
- class aqt.mediasrv.PageContext#
Bases:
enum.IntEnumEnum where members are also (and must be) ints
- UNKNOWN#
- EDITOR#
- REVIEWER#
- PREVIEWER#
- CARD_LAYOUT#
- DECK_OPTIONS#
- NON_LEGACY_PAGE#
- ADDON_PAGE#
- class aqt.mediasrv.LegacyPage#
- html: str#
- context: PageContext#
- class aqt.mediasrv.MediaServer(mw: aqt.main.AnkiQt)#
Bases:
threading.ThreadA class that represents a thread of control.
This class can be safely subclassed in a limited fashion. There are two ways to specify the activity: by passing a callable object to the constructor, or by overriding the run() method in a subclass.
- daemon = True#
A boolean value indicating whether this thread is a daemon thread.
This must be set before start() is called, otherwise RuntimeError is raised. Its initial value is inherited from the creating thread; the main thread is not a daemon thread and therefore all threads created in the main thread default to daemon = False.
The entire Python program exits when only daemon threads are left.
- is_shutdown = False#
- run() None#
Method representing the thread’s activity.
You may override this method in a subclass. The standard run() method invokes the callable object passed to the object’s constructor as the target argument, if any, with sequential and keyword arguments taken from the args and kwargs arguments, respectively.
- shutdown() None#
- getPort() int#
- set_page_html(id: int, html: str, context: PageContext = PageContext.UNKNOWN) None#
- get_page(id: int) LegacyPage | None#
- get_page_html(id: int) str | None#
- get_page_context(id: int) PageContext | None#
- clear_page_html(id: int) None#
- aqt.mediasrv.favicon() flask.Response#
- aqt.mediasrv.handle_request(pathin: str) flask.Response#
- aqt.mediasrv.is_sveltekit_page(path: str) bool#
- aqt.mediasrv.congrats_info() bytes#
- aqt.mediasrv.get_deck_configs_for_update() bytes#
- aqt.mediasrv.update_deck_configs() bytes#
- aqt.mediasrv.get_scheduling_states_with_context() bytes#
- aqt.mediasrv.set_scheduling_states() bytes#
- aqt.mediasrv.import_done() bytes#
- aqt.mediasrv.import_request(endpoint: str) bytes#
- aqt.mediasrv.import_csv() bytes#
- aqt.mediasrv.import_anki_package() bytes#
- aqt.mediasrv.import_json_file() bytes#
- aqt.mediasrv.import_json_string() bytes#
- aqt.mediasrv.search_in_browser() bytes#
- aqt.mediasrv.change_notetype() bytes#
- aqt.mediasrv.deck_options_require_close() bytes#
- aqt.mediasrv.deck_options_ready() bytes#
- aqt.mediasrv.save_custom_colours() bytes#
- aqt.mediasrv.post_handler_list#
- aqt.mediasrv.exposed_backend_list = ['latest_progress', 'get_custom_colours', 'get_deck_names', 'i18n_resources',...#
- aqt.mediasrv.raw_backend_request(endpoint: str) collections.abc.Callable[[], bytes]#
- aqt.mediasrv.post_handlers#
- aqt.mediasrv.legacy_page_data() flask.Response#