zaps166 / QMPlay2

QMPlay2 is a video and audio player which can play most formats and codecs.
GNU Lesser General Public License v3.0
859 stars 178 forks source link

Add support for showing translated lyrics (more languages) #452

Open jose1711 opened 3 years ago

jose1711 commented 3 years ago

Currently only Polish is supported via parsing https://www.tekstowo.pl/. But similar pages exists for other languages, e. g. https://www.karaoketexty.sk/ (Slovak) or https://www.karaoketexty.cz/ (Czech)

zaps166 commented 3 years ago

Also https://makeitpersonal.co/ this is used as a fallback.

jose1711 commented 3 years ago

I think it would be great if the new website definition could be more parametric. For tekstowo.pl for instance:

searchURL = https://www.tekstowo.pl/szukaj,wykonawca,{artist},tytul,{song}.html
selector1 = h2[class="my-2"] + div a, "href"
selector2 = #translation > div, "text"

searchURL is used to compose the URL, selector1 is used to get the URL of the first match, after loading it selector2 is used to get the translated lyrics

jose1711 commented 2 years ago

Or maybe even better would be if the parsing logic will be handed over to a user contributed script and QMplay2 would just display the output. That way anyone could contribute in language of his/her choice.

jose1711 commented 2 years ago

fwiw ncmpc uses separate python scripts to get lyrics from various sites: https://github.com/MusicPlayerDaemon/ncmpc/tree/master/lyrics