mirror of
https://github.com/ankitects/anki.git
synced 2025-09-24 16:56:36 -04:00
Merge pull request #496 from TooYoungTooSimp/patch-1
Use anki.consts.SYNC_BASE instead of hardcoded url
This commit is contained in:
commit
4290bc81eb
2 changed files with 3 additions and 1 deletions
|
@ -28,6 +28,7 @@ Ijgnd
|
||||||
Yoonchae Lee
|
Yoonchae Lee
|
||||||
Evandro Coan <github.com/evandrocoan>
|
Evandro Coan <github.com/evandrocoan>
|
||||||
Alan Du <alanhdu@gmail.com>
|
Alan Du <alanhdu@gmail.com>
|
||||||
|
Yuchen Lei <lyc@xuming.studio>
|
||||||
|
|
||||||
********************
|
********************
|
||||||
|
|
||||||
|
|
|
@ -10,6 +10,7 @@ from typing import List, Union
|
||||||
|
|
||||||
import aqt
|
import aqt
|
||||||
from anki import hooks
|
from anki import hooks
|
||||||
|
from anki.consts import SYNC_BASE
|
||||||
from anki.rsbackend import TR, Interrupted, MediaSyncProgress, Progress, ProgressKind
|
from anki.rsbackend import TR, Interrupted, MediaSyncProgress, Progress, ProgressKind
|
||||||
from anki.types import assert_impossible
|
from anki.types import assert_impossible
|
||||||
from anki.utils import intTime
|
from anki.utils import intTime
|
||||||
|
@ -76,7 +77,7 @@ class MediaSyncer:
|
||||||
shard_str = str(shard)
|
shard_str = str(shard)
|
||||||
else:
|
else:
|
||||||
shard_str = ""
|
shard_str = ""
|
||||||
return f"https://sync{shard_str}.ankiweb.net/msync/"
|
return f"{SYNC_BASE % shard_str}msync/"
|
||||||
|
|
||||||
def _log_and_notify(self, entry: LogEntry) -> None:
|
def _log_and_notify(self, entry: LogEntry) -> None:
|
||||||
entry_with_time = LogEntryWithTime(time=intTime(), entry=entry)
|
entry_with_time = LogEntryWithTime(time=intTime(), entry=entry)
|
||||||
|
|
Loading…
Reference in a new issue