[PR #564] [MERGED] Improved Lyric_finder to retrieve correct lyrics instead of its translation #799

Closed
opened 2026-03-02 23:49:52 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/aome510/spotify-player/pull/564
Author: @genricoloni
Created: 9/16/2024
Status: Merged
Merged: 9/26/2024
Merged by: @aome510

Base: masterHead: master


📝 Commits (2)

  • 754056c Fixed error in lyric_finder/lib.rs that, for some songs, shown the translation of a lyric instead of the actual one
  • 7b36b57 Fix formatting issues as per cargo fmt

📊 Changes

1 file changed (+15 additions, -10 deletions)

View changed files

📝 lyric_finder/src/lib.rs (+15 -10)

📄 Description

Hi,
I noticed that for some lyrics, one of its translation is shown instead of the actual lyric, and this because for some obscure reason Genius responses by putting these translations at the top of the results. You can reproduce this behavior by playing the song "Kingslayer" by "Bring Me The Horizon".
Fortunately, all the results results (at least the bunch of those I checked manually to implement this fix) have "Genius < language > <translation written in that language>" as artist_name so a find() is used to exclude the results with keyword Genius in that field.
The rest of the code hasn't changed, so the first result is chosen.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/aome510/spotify-player/pull/564 **Author:** [@genricoloni](https://github.com/genricoloni) **Created:** 9/16/2024 **Status:** ✅ Merged **Merged:** 9/26/2024 **Merged by:** [@aome510](https://github.com/aome510) **Base:** `master` ← **Head:** `master` --- ### 📝 Commits (2) - [`754056c`](https://github.com/aome510/spotify-player/commit/754056c27b2bd4d6a33733cce23525ab36253605) Fixed error in lyric_finder/lib.rs that, for some songs, shown the translation of a lyric instead of the actual one - [`7b36b57`](https://github.com/aome510/spotify-player/commit/7b36b57adc7f2a0213660adcf645837436815a25) Fix formatting issues as per cargo fmt ### 📊 Changes **1 file changed** (+15 additions, -10 deletions) <details> <summary>View changed files</summary> 📝 `lyric_finder/src/lib.rs` (+15 -10) </details> ### 📄 Description Hi, I noticed that for some lyrics, one of its translation is shown instead of the actual lyric, and this because for some obscure reason Genius responses by putting these translations at the top of the results. You can reproduce this behavior by playing the song "Kingslayer" by "Bring Me The Horizon". Fortunately, all the results results (at least the bunch of those I checked manually to implement this fix) have "Genius < language > <_translation_ written in that language>" as `artist_name` so a `find()` is used to exclude the results with keyword `Genius` in that field. The rest of the code hasn't changed, so the first result is chosen. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-03-02 23:49:52 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/spotify-player#799
No description provided.