Skip to content

Commit

Permalink
Update SiriusXM player selectors due to redesign (#4394)
Browse files Browse the repository at this point in the history
  • Loading branch information
dasevilla authored Jan 4, 2024
1 parent 69e02ec commit 13f1bd4
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 13 deletions.
22 changes: 10 additions & 12 deletions src/connectors/siriusxm-player.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,20 +15,18 @@ const filter = MetadataFilter.createFilter({
track: [removeYear, removeCover, removeExclusive],
});

Connector.playerSelector = '.sxm-player-controls';
Connector.artistSelector = '.sxm-player-controls .artist-name';
Connector.trackSelector = '.sxm-player-controls .track-name';
Connector.playerSelector = '._playbackControls_1cag9_17';

Connector.isPlaying = () => {
return (
Util.getAttrFromSelectors(
'.sxm-player-controls .play-pause-btn',
'title',
) === 'Pause'
);
};
Connector.artistTrackSelector = '._playbackControls_1cag9_17 ._title_1cag9_286';

Connector.trackArtSelector =
'._playbackControls_1cag9_17 ._trackImage_1cag9_178 ._image-image_2xo9u_188';

Connector.playButtonSelector =
'._playbackControls_1cag9_17 button[aria-label="Play"]';

Connector.trackArtSelector = '.album-image-cell img.album-image';
Connector.pauseButtonSelector =
'._playbackControls_1cag9_17 button[aria-label="Pause"]';

Connector.isScrobblingAllowed = () => {
const artist = Connector.getArtist()?.toLowerCase();
Expand Down
2 changes: 1 addition & 1 deletion src/core/connectors.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1055,7 +1055,7 @@ export default <ConnectorMeta[]>[
},
{
label: 'SiriusXM',
matches: ['*://player.siriusxm.com/*', '*://player.siriusxm.ca/*'],
matches: ['*://www.siriusxm.com/*', '*://www.siriusxm.ca/*'],
js: 'siriusxm-player.js',
id: 'siriusxm-player',
},
Expand Down

0 comments on commit 13f1bd4

Please sign in to comment.