Skip to content

Commit 16f8c52

Browse files
committed
change: Spicetify.LibURI to URI
1 parent ecf782e commit 16f8c52

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

src/preprocess/preprocess.go

+6-6
Original file line numberDiff line numberDiff line change
@@ -446,16 +446,16 @@ this.getAlbumTracks && this.queueTracks && (Spicetify.addToQueue = async (uri) =
446446
const trackUris = [];
447447
448448
const add = async (inputUri) => {
449-
const uriObj = Spicetify.LibURI.from(inputUri);
449+
const uriObj = Spicetify.URI.from(inputUri);
450450
if (!uriObj) {
451451
console.error("Invalid URI. Skipped ", inputUri);
452452
return;
453453
}
454454
455-
if (uriObj.type === Spicetify.LibURI.Type.ALBUM) {
455+
if (uriObj.type === Spicetify.URI.Type.ALBUM) {
456456
const tracks = await getAlbumAsync(inputUri);
457457
trackUris.push(...tracks);
458-
} else if (uriObj.type === Spicetify.LibURI.Type.TRACK || uriObj.type === Spicetify.LibURI.Type.EPISODE) {
458+
} else if (uriObj.type === Spicetify.URI.Type.TRACK || uriObj.type === Spicetify.URI.Type.EPISODE) {
459459
trackUris.push(inputUri);
460460
} else {
461461
console.error("Only Track, Album, Episode URIs are accepted. Skipped ", inputUri);
@@ -482,18 +482,18 @@ this.getAlbumTracks && this.removeTracksFromQueue && (Spicetify.removeFromQueue
482482
483483
const indices = new Set();
484484
const add = async (inputUri) => {
485-
const uriObj = Spicetify.LibURI.from(inputUri);
485+
const uriObj = Spicetify.URI.from(inputUri);
486486
if (!uriObj) {
487487
console.error("Invalid URI. Skipped ", inputUri);
488488
return;
489489
}
490490
491-
if (uriObj.type === Spicetify.LibURI.Type.ALBUM) {
491+
if (uriObj.type === Spicetify.URI.Type.ALBUM) {
492492
const tracks = await getAlbumAsync(inputUri);
493493
tracks.forEach((trackUri) => {
494494
Spicetify.Queue.next_tracks.forEach((t, i) => t.uri == trackUri && indices.add(i))
495495
})
496-
} else if (uriObj.type === Spicetify.LibURI.Type.TRACK || uriObj.type === Spicetify.LibURI.Type.EPISODE) {
496+
} else if (uriObj.type === Spicetify.URI.Type.TRACK || uriObj.type === Spicetify.URI.Type.EPISODE) {
497497
Spicetify.Queue.next_tracks.forEach((t, i) => t.uri == inputUri && indices.add(i))
498498
} else {
499499
console.error("Only Album, Track and Episode URIs are accepted. Skipped ", inputUri);

0 commit comments

Comments
 (0)