QMPlay2 icon indicating copy to clipboard operation
QMPlay2 copied to clipboard

Add support for showing translated lyrics (more languages)

Open jose1711 opened this issue 2 years ago • 4 comments

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)

jose1711 avatar Oct 28 '21 11:10 jose1711

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

zaps166 avatar Oct 28 '21 20:10 zaps166

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 avatar Oct 29 '21 10:10 jose1711

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 avatar Nov 30 '21 10:11 jose1711

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

jose1711 avatar May 20 '22 14:05 jose1711