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

fix various lyrics issues #584

Merged
merged 11 commits into from
Feb 9, 2022
Merged

fix various lyrics issues #584

merged 11 commits into from
Feb 9, 2022

Conversation

Araxeus
Copy link
Collaborator

@Araxeus Araxeus commented Jan 29, 2022

stuff that was fixed:

  1. Style of autogenerated lyrics was different from ours
    (fixed by applying youtube's css rules to our element by adding the classes .description.ytmusic-description-shelf-renderer and applying our css rules to .description (centered text and 1.1vw text size)

  2. Lyrics tabs disabled after clicking it / the discover tab

  3. Footer text content not showing up (Source: Genius text)

  4. Lyrics not updating if next song start while viewing lyrics (happened because we set the lyrics only on lyricsTab.onclick)

  5. Lyrics not updating if the app couldn't get lyrics for the current song

  6. Certain songs not having lyrics - happened because the name wasn't cleaned enough, now it uses a regex
    /\((?:official)?[ ]?(?:music)?[ ]?(?:lyric[s]?)?[ ]?(?:video)?\)$/i (Test on regex101)
    to detect combinations like:

    (official)
    (music video)
    (official music)
    (official music video)
    (official music lyrics)
    (official video)
    (official lyrics)
    (official lyric)
    (official lyric video)
    (official lyrics video)
    (lyric video)
    (lyrics video)
    (lyrics)
    (lyric)

credit to @lazerl0rd in #573 for originally adding the text center alignment css and motivating me to fix more lyrics stuff ^^

fix #577, fix #506, fix #495, fix #376

There's sometimes a bug that happens after clicking the discover tab and then the lyrics tab multiple times, its on youtube's end and can also happens in a normal browser

@Araxeus Araxeus force-pushed the fix-lyrics branch 4 times, most recently from d972042 to a87d418 Compare January 29, 2022 14:28
Copy link
Owner

@th-ch th-ch left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks better with the fixes, thanks! ✅

}

function setTabsOnclick(callback) {
for (tab of [tabs.upNext, tabs.discover]) {
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit to avoid a warning about tab:

Suggested change
for (tab of [tabs.upNext, tabs.discover]) {
for (const tab of [tabs.upNext, tabs.discover]) {

@th-ch th-ch merged commit 9b7c1a8 into th-ch:master Feb 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants