mirror of
https://github.com/Mastermindzh/tidal-hifi.git
synced 2024-11-22 21:42:46 +01:00
Fix URL fetching
This commit is contained in:
parent
08ec7fadac
commit
3cc288e014
@ -250,7 +250,6 @@ function updateMediaInfo(options, notify) {
|
|||||||
*/
|
*/
|
||||||
setInterval(function () {
|
setInterval(function () {
|
||||||
const title = elements.getText("title");
|
const title = elements.getText("title");
|
||||||
//const id = elements.get("url").href.replace(/[^0-9]/g, "");
|
|
||||||
const artists = elements.getText("artists");
|
const artists = elements.getText("artists");
|
||||||
const current = elements.getText("current");
|
const current = elements.getText("current");
|
||||||
const duration = elements.getText("duration");
|
const duration = elements.getText("duration");
|
||||||
@ -285,12 +284,12 @@ setInterval(function () {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Video/Song check if it's a video return URL as undefined due to it not having an id.
|
// Video/Song check if it's a video return URL as undefined due to it not having an id.
|
||||||
switch(elements.get("url")) {
|
switch(elements.get("title").querySelector("a")) {
|
||||||
case null:
|
case null:
|
||||||
currentURL = undefined;
|
currentURL = undefined;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
const id = elements.get("url").href.replace(/[^0-9]/g, "");
|
const id = elements.get("title").querySelector("a").href.replace(/[^0-9]/g, "");
|
||||||
currentURL = `https://tidal.com/browse/track/${id}`;
|
currentURL = `https://tidal.com/browse/track/${id}`;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user