Skip to content

Commit

Permalink
Fix playlist page tag section selector on for Spotify V1.2.46+ - fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Bergbok committed Sep 28, 2024
1 parent e9e7022 commit dc0ddad
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion CustomApps/playlist-tags/src/funcs.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -1004,7 +1004,13 @@ export async function renderPlaylistPageElements(tags: string[]): Promise<void>
renderElement(<TagList/>, container);

try {
const target = await waitForElement('div.playlist-playlist-playlistContent > div.contentSpacing', 10000);
let target_selector: string = ''
if (Spicetify.Platform.version >= '1.2.46') {
target_selector = 'div.playlist-playlist-playlistContent > div.main-useDropTarget-base > div.contentSpacing';
} else {
target_selector = 'div.playlist-playlist-playlistContent > div.contentSpacing';
}
const target = await waitForElement(target_selector, 10000);
if (target !== null) {
target.insertBefore(container, target.firstChild);
}
Expand Down

0 comments on commit dc0ddad

Please sign in to comment.