Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Romanized MusixMatch Lyrics #229

Merged
merged 1 commit into from
Jul 9, 2024
Merged

Romanized MusixMatch Lyrics #229

merged 1 commit into from
Jul 9, 2024

Conversation

yodaluca23
Copy link
Contributor

@yodaluca23 yodaluca23 commented Jul 7, 2024

Added a switch to settings (in Lyric Options) for "Romanized MusixMatch Lyrics" when enabled, it will fetch the Romanized lyric translations for each song and replace the translated parts, when using MusixMatch Source.

  • Add switch in EeveeSettingsViewController+LyricsOptionsSection.swift to enable UserDefaults.lyricsOptions.musixmatchRomanizations
  • Add necessary code for UserDefaults.lyricsOptions.musixmatchRomanizations to work (edited Settings/LyricsOptions.swift and UserDefaults+Extension.swift)

In MusixMatch repository:

  • Introduced checks for UserDefaults.lyricsOptions.musixmatchRomanizations to determine if Romanized lyrics should be fetched.
  • Updated logic in both subtitle (time synced lyrics) and plain lyrics (non-time synced lyrics) handling to fetch and integrate Romanized translations when required.
  • Added API call to "/ws/1.1/crowd.track.translations.get" to retrieve Romanized translations.
  • Included logic to process the translation data and integrate it with the existing plain lyrics or subtitles.
  • If anything fails with Romanized lyrics, fallback to default behavior without translation.

@whoeevee whoeevee self-requested a review July 9, 2024 02:21
@whoeevee whoeevee merged commit 742909e into whoeevee:swift Jul 9, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants