mirror of
https://github.com/th-ch/youtube-music.git
synced 2026-01-11 18:41:47 +00:00
Merge pull request #1052 from Araxeus/fix-lyrics-bugs
[lyrics-genius] Fix lyrics not showing up or showing up when they shouldn't
This commit is contained in:
@ -22,7 +22,7 @@ const fetchFromGenius = async (metadata) => {
|
||||
metadata.title
|
||||
)}`;
|
||||
let response = await fetch(
|
||||
`https://genius.com/api/search/multi?per_page=5&q=${encodeURI(queryString)}`
|
||||
`https://genius.com/api/search/multi?per_page=5&q=${encodeURIComponent(queryString)}`
|
||||
);
|
||||
if (!response.ok) {
|
||||
return null;
|
||||
|
||||
@ -2,7 +2,7 @@ const { ipcRenderer } = require("electron");
|
||||
const is = require("electron-is");
|
||||
|
||||
module.exports = () => {
|
||||
ipcRenderer.on("update-song-info", (_, extractedSongInfo) => {
|
||||
ipcRenderer.on("update-song-info", (_, extractedSongInfo) => setTimeout(() => {
|
||||
const tabList = document.querySelectorAll("tp-yt-paper-tab");
|
||||
const tabs = {
|
||||
upNext: tabList[0],
|
||||
@ -90,5 +90,5 @@ module.exports = () => {
|
||||
tabs.lyrics.removeAttribute("disabled");
|
||||
tabs.lyrics.removeAttribute("aria-disabled");
|
||||
}
|
||||
});
|
||||
}, 500));
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user