guopenghui / obsidian-language-learner

MIT License
631 stars 59 forks source link

langr-audio 播放本地文件异常提示 not found #157

Open LuGHuaaa opened 11 months ago

LuGHuaaa commented 11 months ago

尝试了以下方式都不行

langr-audio: "~/documents/abc.mp3"
langr-audio: "app://local/Users/neo/abc.mp3"
langr-audio: "app://Users/neo/abc.mp3"

但是用这样的方式可以

langr-audio: "app://7a72eb64b556739050594fc7cc7f8bc4d92b/Users/neo/02Track2.mp3"

不确定是 Mac 的方式不一样还是版本问题

OS: Sonoma 14.1 Obsidian version: 1.4.16 language-learner version: 0.2.5

guopenghui commented 11 months ago

obsidian某次更新后,不允许以app://local的形式插入文件了。这个可以修复,但是估计以后无法引用库外面的文件了 应该还有办法

guopenghui commented 11 months ago

https://obsidian.md/changelog/2023-05-03-desktop-v1.2.8/

LuGHuaaa commented 11 months ago

@guopenghui 我这边急着用, 所以根据你给的文档描述改了一下. 用起来没什么问题, 所以提了个 pr 你看看 #158

guopenghui commented 11 months ago

看到了,我在想是否需要支持访问库外面的文件呢? 其实这个插入本地音频的功能我完全没有用过,所以也不知道其他人是什么需求

LuGHuaaa commented 11 months ago

就我个人使用情况来说, 基本没有访问库外文件的场景, 因为多端同步会导致无法访问.

实际上比起访问库外文件, 更想要能 ![[]] 双链接直接访问, 不然每次还要单独找文件. 不过这个好像没办法实现.

limanman77 commented 11 months ago

@LuGHuaaa

请问 langr-audio: "app://7a72eb64b556739050594fc7cc7f8bc4d92b/Users/neo/02Track2.mp3" 是如何获取到的呢,前面那串编码怎么来的

感谢

LuGHuaaa commented 11 months ago

@LuGHuaaa

请问 langr-audio: "app://7a72eb64b556739050594fc7cc7f8bc4d92b/Users/neo/02Track2.mp3" 是如何获取到的呢,前面那串编码怎么来的

感谢

这个链接是我在播放 mp3 的时候在 Console 的 Network 里捞出来的, 我不知道具体来源是哪里的. 另外据我观察这个 id 会变动, 所以不建议用这个做依据.

limanman77 commented 11 months ago

好的,那就等开发者解决啦,我也碰到本地文件无法识别的问题

Danielcns commented 6 months ago

把音频放在阿里云的oss