themoeway / local-audio-yomichan

Anki add-on to run a local audio server for Yomichan.
MIT License
73 stars 10 forks source link

Switch to pathlib and support all audio formats #12

Closed tsweet64 closed 1 year ago

tsweet64 commented 1 year ago

This moves some of the file listing code to a more generic function shared across all the sources, and ensures that all (browser supported) audio file types are readable by all sources. Additionally, most os.path code was changed to pathlib.Path due to being more extensible/easier to work with for this purpose.

More changes will probably be needed once we migrate to the new audio sources, but everything has been tested in the latest anki with the currently-supported audio collection (and files converted to opus) and appears to work fine. However, Android stuff is untested.

Closes #10

Aquafina-water-bottle commented 1 year ago

Looks good, and the absolute path still works on my machine, so #8 is automatically solved as well. Thanks for the PR!