jdlorimer/chinese-support-redux

[Bug] - Long filenames not truncated for TTS mp3 files

Opened this issue · 4 comments

Hey guys,
So I have problem with sync my collection. I already deleted anki and all related files to it from my phone, but it still reappearing.

java.io.IOException “name"_google.zh-cn.mp3: file name too long

The main problem is that now, when I adding new anki, they are not playing audio. Is there any chance of finding this card and simply remove it? Can't find it in "browse" section, but I guess it is still somewhere "in trash".

Cheers,
Kriss.

Ok,I managed to resolve to problem, if was actually quite easy. just Check Media and then delete the files. :<.

@KrissPl96 What was the entire file name? The add-on probably needs to do a better job of sanitising the names before saving to disk.

@luoliyan
"什么样的社团是和大卫呢?那就看大卫的兴趣和目的了。大卫想参加**画社团,可是他没学过**画,他担心人家不要他。王丽叫大卫别担心,喜欢**画的学生,社团都欢迎,像大卫这样喜欢**画的留学生,准抢手。大卫很高兴,他决定现在就去看看。"

Every filesystem has its own max filename length, therefore I recommend that the fix for long Hanzi mp3 filename parsing is truncated in relation to the relative path of the addon on disk.
@KrissPl96 can you please provide your operating system and version in the original description?