Current lyric providers are great for English lyrics, but Latin music is rarely available
-
I would like to suggest the addition of two services that contain many songs in Portuguese. Unfortunately I'm not a developer and I can't make a PR to solve this, but I tried to gather some useful information.
Example 1: vagalume.com.br
Music: Tente outra vez
Artist: Raul SeixasTo get the lyrics of this song just access
https://www.vagalume.com.br/{artist}/{title}.html
https://www.vagalume.com.br/raul-seixas/tente-outra-vez.htmlThe cantata player has implemented this service as follows
<provider name="vagalume.com.br" charset="iso-8859-1" url="https://www.vagalume.com.br/{artist}/{title}.html"> <urlFormat replace=" _@,;&\/'"." with="-"/> <extract> <item tag="<span class="editable_area">"/> </extract> <extract> <!-- new --> <item tag="<div itemprop=description>"/> </extract> </provider>
https://github.com/CDrummond/cantata/blob/master/context/lyrics_providers.xml#L328
It is also possible to get the translation of songs in English to Portuguese by adding
-translation
to the end of the url
https://www.vagalume.com.br/toto/i-will-remember-traducao.html<provider name="vagalume.com.br (PORTUGUESE)" charset="iso-8859-1" url="https://www.vagalume.com.br/{artist}/{title}-traducao.html"> <urlFormat replace=" _@,;&\/'"." with="-"/> <extract> <item tag="<div class="tab_traducao sideBySide lyricArea tab_tra_pt">"/> </extract> <extract> <!-- new --> <item tag="<div id=lyr_translation>"/> <item begin="<div>" end="null"/> </extract> </provider>
https://github.com/CDrummond/cantata/blob/master/context/lyrics_providers.xml#L337
Example 2: letras.mus.br
The procedure is basically the samehttps://www.letras.mus.br/winamp.php?musica={title}&artista={artist}
https://www.letras.mus.br/winamp.php?musica=tente-outra-vez&artista=raul-seixas<provider name="letras.mus.br" charset="utf-8" url="https://www.letras.mus.br/winamp.php?musica={title}&artista={artist}"> <urlFormat replace="_@,;&\/"" with="_"/> <urlFormat replace=" " with="+"/> <extract> <!-- new --> <item begin="</div>" end="<div id="banner">"/> </extract> <extract> <item begin="</div>" end="</div>"/> </extract> <invalidIndicator value="Verifique se o nome do seu arquivo e sua"/> </provider>
https://github.com/CDrummond/cantata/blob/master/context/lyrics_providers.xml#L101
I hope this will be useful
-
I forgot to mention that vagalume.com.br also has its own api: https://api.vagalume.com.br/
-
Both cantata and YaRock uses the ultimatelyricsprovider code from Clementine.
It's based on scraping HTML, so whenever they do an update or redesign of their web pages the lyrics will break. Hardly any lyrics providers in Clementine works because of this. It's better to do it through API's.
YaRock by the way has ripped lot's of code from Clementine and removed the original copyrights which is an awful thing to do, and a violation of the GPL license.The API documentation on https://api.vagalume.com.br/ isn't in English, so I can't understand it.
However I can guide you through it if you want to learn development. It's not too hard as you can copy and rename one of the existing lyrics implementations and just modify a few things.
But you first need to check that you can get the full lyrics through the API, and that it does not require payments, etc.
If the API is in Json can copy, rename and modify the following files https://github.com/strawberrymusicplayer/strawberry/blob/master/src/lyrics/auddlyricsprovider.cpp and https://github.com/strawberrymusicplayer/strawberry/blob/master/src/lyrics/auddlyricsprovider.hIf it's in XML you can copy https://github.com/strawberrymusicplayer/strawberry/blob/master/src/lyrics/chartlyricsprovider.cpp and https://github.com/strawberrymusicplayer/strawberry/blob/master/src/lyrics/chartlyricsprovider.h
Json is preferred if they offer both.
-
To include new lyrics providers, it's added here:
https://github.com/strawberrymusicplayer/strawberry/blob/master/src/core/application.cpp#L68
and:
https://github.com/strawberrymusicplayer/strawberry/blob/master/src/core/application.cpp#L155Then here: https://github.com/strawberrymusicplayer/strawberry/blob/master/src/CMakeLists.txt#L162
and here: https://github.com/strawberrymusicplayer/strawberry/blob/master/src/CMakeLists.txt#L378