MCPcopy
hub / github.com/spicetify/cli / watchChange

Function watchChange

Extensions/trashbin.js:247–276  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

245 }
246
247 function watchChange() {
248 const data = Spicetify.Player.data || Spicetify.Queue;
249 if (!data) return;
250
251 const isBanned = trashSongList[data.item.uri];
252 setWidgetState(isBanned, Spicetify.URI.fromString(data.item.uri).type !== Spicetify.URI.Type.TRACK);
253
254 if (userHitBack) {
255 userHitBack = false;
256 return;
257 }
258
259 if (isBanned) {
260 Spicetify.Player.next();
261 return;
262 }
263
264 let uriIndex = 0;
265 let artistUri = data.item.metadata.artist_uri;
266
267 while (artistUri) {
268 if (trashArtistList[artistUri]) {
269 Spicetify.Player.next();
270 return;
271 }
272
273 uriIndex++;
274 artistUri = data.item.metadata[`artist_uri:${uriIndex}`];
275 }
276 }
277
278 /**
279 *

Callers 1

refreshEventListenersFunction · 0.85

Calls 1

setWidgetStateFunction · 0.85

Tested by

no test coverage detected