etopeter / logseq-plugin-audiobookshelf-import

Audiobookshelf Import plugin for Logseq
GNU General Public License v3.0
3 stars 1 forks source link

`TypeError`: e.media.episodes is not iterable #17

Open isosphere opened 3 months ago

isosphere commented 3 months ago

Before this is thrown, an object is printed showing a podcast with numEpisodes: 0. There's no episodes key at all. We should probably check before trying to iterate.

https://github.com/etopeter/logseq-plugin-audiobookshelf-import/blob/e9d6df01ad9902d1194f8ba8afca15317bcb0f84/src/index.ts#L482

isosphere commented 3 months ago

The schema may have changed; I patched the above but it looks like podcast.media.episodes doesn't get populated when there are episodes.