moehmeni / syncedlyrics

Get an LRC format (synchronized) lyrics for your music
MIT License
188 stars 18 forks source link

Asyncio support #13

Closed xizeyoupan closed 10 months ago

xizeyoupan commented 10 months ago

I forked this repo and added asyncio support. And I added the duration parameter if the provider supports it. I also added a new Tencent provider.

https://github.com/xizeyoupan/syncedlyrics_aio

moehmeni commented 10 months ago

Thanks for the contribution, I appreciate it. Feel free to make PR so I can make some modifications if needed.

The problem with the async support is some packages like spotdl rely on the current not-async version and I think it would be incompatibility, therefore I think it is good to have it in another repo/package like yours. Another solution is using asyncio.run to wrap all the async functions into a sync version of them, like https://stackoverflow.com/a/55365529/12696223

xizeyoupan commented 10 months ago

Yes , this is an alternative. I wish it would help if someone else needs async support.😛

plutonium-239 commented 7 months ago

thank you for your work, both @xizeyoupan and @0x7d4 the asyncio version is also great for easily timing out a search using asyncio's waiting syntax