@@ -205,7 +205,7 @@ export async function SeekPosition(
205
205
export async function PlaySpecificList (
206
206
instance : SpotifyInstanceBase ,
207
207
deviceId : string ,
208
- context_uri : string ,
208
+ raw_uri : string ,
209
209
behavior : 'return' | 'resume' | 'force' ,
210
210
attempt = 0
211
211
) : Promise < void > {
@@ -215,25 +215,25 @@ export async function PlaySpecificList(
215
215
try {
216
216
if ( behavior !== 'force' ) {
217
217
const data = await getMyCurrentPlaybackState ( reqOptions )
218
- if ( data . body ?. context ?. uri === context_uri ) {
218
+ if ( data . body ?. context ?. uri === raw_uri ) {
219
219
if ( behavior == 'return' || ( behavior == 'resume' && data . body . is_playing ) ) {
220
- instance . log ( 'warn' , `Already playing that ${ context_uri } ` )
220
+ instance . log ( 'warn' , `Already playing that ${ raw_uri } ` )
221
221
} else if ( behavior == 'resume' ) {
222
222
await play ( reqOptions , { deviceId } )
223
223
}
224
224
225
225
return
226
226
}
227
227
}
228
-
228
+ const context_uri = await instance . parseVariablesInString ( raw_uri )
229
229
await play ( reqOptions , {
230
230
deviceId,
231
231
context_uri,
232
232
} )
233
233
} catch ( err ) {
234
234
const retry = await instance . checkIfApiErrorShouldRetry ( err )
235
235
if ( retry && attempt <= MAX_ATTEMPTS ) {
236
- return PlaySpecificList ( instance , deviceId , context_uri , behavior , attempt + 1 )
236
+ return PlaySpecificList ( instance , deviceId , raw_uri , behavior , attempt + 1 )
237
237
} else {
238
238
throw err
239
239
}
0 commit comments