Skip to content

Addon does not set the sync-server url in Anki versions > 2.1.26 #19

@kalehmann

Description

@kalehmann

As of Anki version 2.1.28, the server address is not affected by the addon anymore.

What did I do?

I installed Anki 2.1.28 and created an addon with the following content:

import anki.sync, anki.hooks, aqt

addr = "http://127.0.0.1:27701/" # put your server address here
anki.sync.SYNC_BASE = "%s" + addr
def resetHostNum():
    aqt.mw.pm.profile['hostNum'] = None
anki.hooks.addHook("profileLoaded", resetHostNum)

Then I started Anki and hit the Sync button.

What did I expect to happen?

I expected Anki to make a request to the url specified in the addon.

What did happen instead?

Anki made a request to https://sync.ankiweb.net/msync/ instead.

Further information

The urls used for synchronizaton are hardcoded to https://sync.ankiweb.net since the commits 0e5b7da62aa0fd3726ca958f1cdae265d2dc0d91 and 529e89f48e747904ffd9c8ebac09739fb410bcaf.
Therefore they cannot be easily changed by the addon anymore.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions