'use strict';

Connector.playerSelector = '.sxm-player-controls';

Connector.artistSelector = '.sxm-player-controls .artist-name';

Connector.trackSelector = '.sxm-player-controls .track-name';

Connector.isPlaying = () => {
	return $('.sxm-player-controls .play-pause-btn').attr('title') === 'Pause';
};

Connector.trackArtSelector = '.album-image-cell img';

Connector.isScrobblingAllowed = () => {
	const artist = Connector.getArtist().toLowerCase();
	return !artist.includes('siriusxmu');
};

@@ -4,24 +4,315 @@
 e strict';%0A%0A
+/*%0A * On some %22decade%22 stations SiriusXM appends the last two digits%0A * of the release year to the song title like this: Where Is The Love (03).%0A *%0A * This filter removes such suffixes.%0A */%0A%0Aconst filter = new MetadataFilter(%7B track: removeYear %7D);%0Aconst removeYearRe = /%5Cs%5C(%5Cd%7B2%7D%5C)%5Cs?$/g;%0A%0A
 Connector.pl
@@ -726,24 +726,26 @@
 st()
-.toLowerCase();%0A
+;%0A%09if (artist) %7B%0A%09
 %09ret
@@ -756,16 +756,30 @@
 !artist.
+toLowerCase().
 includes
@@ -793,11 +793,135 @@
 sxmu');%0A
+%09%7D%0A%0A%09return false;%0A%7D;%0A%0AConnector.applyFilter(filter);%0A%0Afunction removeYear(track) %7B%0A%09return track.replace(removeYearRe, '');%0A
 %7D
-;
 %0A

Fix siriusxm-player connector