xiaoyifang / goldendict-ng

The Next Generation GoldenDict
https://xiaoyifang.github.io/goldendict-ng/
Other
1.71k stars 95 forks source link

Extension-less audio links are not added to `PronounceEngine` -> `dictAudioMap` causing some audio not auto played #1962

Closed shenlebantongying closed 3 days ago

shenlebantongying commented 3 days ago

Sample dict file -> .lsa from https://sourceforge.net/projects/goldendict/files/dictionary%20content/1.1/

The code executed to line 27

The isAudioUrl returns false.

I think for gdau links, it should unconditionally return true without doing the Filetype::isNameOfSound

https://github.com/xiaoyifang/goldendict-ng/blob/bb87c55b1a3725f8f11f242c534373d8585b25e2/src/common/utils.hh#L262-L263

Observed bug: Pronounce button not active and auto pronounce doesn't work.

xiaoyifang commented 3 days ago

I think for gdau links, it should unconditionally return true without doing the Filetype::isNameOfSound

yes, I agree.