• Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Register
    • Login

    Current lyric providers are great for English lyrics, but Latin music is rarely available

    Scheduled Pinned Locked Moved
    Feature Suggestions
    2
    4
    342
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • M
      musk
      last edited by

      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 Seixas

      To 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.html

      The 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=" _@,;&amp;\/'&quot;." with="-"/>
          <extract>
            <item tag="&lt;span class=&quot;editable_area&quot;&gt;"/>
          </extract>
          <extract> <!-- new -->
            <item tag="&lt;div itemprop=description&gt;"/>
          </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=" _@,;&amp;\/'&quot;." with="-"/>
          <extract>
            <item tag="&lt;div class=&quot;tab_traducao sideBySide lyricArea tab_tra_pt&quot;&gt;"/>
          </extract>
          <extract> <!-- new -->
            <item tag="&lt;div id=lyr_translation&gt;"/>
            <item begin="&lt;div&gt;" 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 same

      https://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}&amp;artista={artist}">
          <urlFormat replace="_@,;&amp;\/&quot;" with="_"/>
          <urlFormat replace=" " with="+"/>
          <extract> <!-- new -->
            <item begin="&lt;/div&gt;" end="&lt;div id=&quot;banner&quot;&gt;"/>
          </extract>
          <extract>
            <item begin="&lt;/div&gt;" end="&lt;/div&gt;"/>
          </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

      1 Reply Last reply Reply Quote 0
      • M
        musk
        last edited by

        I forgot to mention that vagalume.com.br also has its own api: https://api.vagalume.com.br/

        jonasJ 1 Reply Last reply Reply Quote 0
        • jonasJ
          jonas @musk
          last edited by jonas

          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.h

          If 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.

          jonasJ 1 Reply Last reply Reply Quote 0
          • jonasJ
            jonas @jonas
            last edited by

            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#L155

            Then 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

            1 Reply Last reply Reply Quote 0
            • First post
              Last post
            Powered by NodeBB | Contributors