fix: Fixed not finding album name whilst on queue page

This commit is contained in:
2024-06-09 15:50:49 +02:00
parent ecbfa7e226
commit 28a9458dfc
6 changed files with 17 additions and 6 deletions

View File

@@ -58,6 +58,7 @@ const elements = {
mediaItem: "[data-type='mediaItem']",
album_header_title: '*[class^="playingFrom"] span:nth-child(2)',
playing_from: '*[class^="playingFrom"] span:nth-child(2)',
queue_album: "*[class^=playQueueItemsContainer] *[class^=groupTitle] span:nth-child(2)",
currentlyPlaying: "[class^='isPlayingIcon'], [data-test-is-playing='true']",
album_name_cell: '[class^="album"]',
tracklist_row: '[data-test="tracklist-row"]',
@@ -133,6 +134,12 @@ const elements = {
}
}
// see whether we're on the queue page and get it from there
const queueAlbumName = elements.getText("queue_album");
if (queueAlbumName) {
return queueAlbumName;
}
return "";
},