This repository has been archived by the owner on May 28, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 56
MacOS 下,发音文件下载失败 #111
Comments
谢谢。这里遇到同样问题,照着改完后可以正常下载发音。 |
多谢, 这个对window也适用,实际下载会直接下载到安装文件夹中去了,而不是 媒体文件夹 媒体文件夹: C:\Users\自己的\AppData\Roaming\Anki2\账户名\collection.media 直接装 : D:\Application\Learn\Anki ( 安装文件夹中 ) |
~\Anki2\addons21\1284759083\addon\addonWindow.py window 下我修改了 代码。 就可以正常下载到Anki 的媒体文件了。 是否可以试试 MAC 下的? 原来: # 添加发音任务
if whichPron and wordItemData.get(whichPron):
audiosDownloadTasks.append((f"{whichPron}_{wordItemData['term']}.mp3", wordItemData[whichPron],)) 修改为: # 添加发音任务
if whichPron and wordItemData.get(whichPron):
media_dir = mw.col.media.dir()
fpath = os.path.join(media_dir, f"{whichPron}_{wordItemData['term']}.mp3")
audiosDownloadTasks.append((fpath, wordItemData[whichPron],)) |
M1芯片Senoma14.0,可以解决 |
已成功,18款 Intel Macbook通过这个方法可以解决发音无法下载的问题 |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
[23/10/2022 20:20:39][ WARNING] -- 下载AmEPron_invariant.mp3:http://dict.youdao.com/dictvoice?audio=invariant&type=2异常: [Errno 30]
Read-only file system: 'AmEPron_invariant.mp3' - (dict2Anki.workers.AudioDownloadWorker)
分析发现addonWindow.py的这行语句里没有路径
audiosDownloadTasks.append((f"{whichPron}{wordItemData['term']}.mp3", wordItemData[whichPron],))
改成如下形式可下载成功
audiosDownloadTasks.append((f"/Users/testuser/Library/Application Support/Anki2/账户1/collection.media/{whichPron}{wordItemData['term']}.mp3", wordItemData[whichPron],))
The text was updated successfully, but these errors were encountered: