()
| 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 | * |
no test coverage detected