@@ -273,7 +273,20 @@ window.Spicetify = {
273
273
{
274
274
objectToCheck : Spicetify . ReactComponent . Cards ,
275
275
name : "Spicetify.ReactComponent.Cards" ,
276
- methods : new Set ( [ "Default" , "Hero" , "CardImage" , "Album" , "Artist" , "Audiobook" , "Episode" , "Playlist" , "Profile" , "Show" , "Track" ] )
276
+ methods : new Set ( [
277
+ "Default" ,
278
+ "Hero" ,
279
+ "CardImage" ,
280
+ "Album" ,
281
+ "Artist" ,
282
+ "Audiobook" ,
283
+ "Episode" ,
284
+ "Playlist" ,
285
+ "Profile" ,
286
+ "Show" ,
287
+ "Track" ,
288
+ "FeatureCard"
289
+ ] )
277
290
} ,
278
291
{
279
292
objectToCheck : Spicetify . ReactHook ,
@@ -921,6 +934,23 @@ Spicetify.Events = (() => {
921
934
playerState . cache = playerState . current ;
922
935
} ) ;
923
936
937
+ ( function waitProductStateAPI ( ) {
938
+ if ( ! Spicetify . Platform ?. UserAPI ) {
939
+ setTimeout ( waitProductStateAPI , 100 ) ;
940
+ return ;
941
+ }
942
+
943
+ const productState = Spicetify . Platform . UserAPI . _product_state || Spicetify . Platform . UserAPI . _product_state_service ;
944
+ if ( productState ) return ;
945
+ if ( ! Spicetify . Platform ?. ProductStateAPI ) {
946
+ setTimeout ( waitProductStateAPI , 100 ) ;
947
+ return ;
948
+ }
949
+
950
+ const productStateApi = Spicetify . Platform . ProductStateAPI . productStateApi ;
951
+ Spicetify . Platform . UserAPI . _product_state_service = productStateApi ;
952
+ } ) ( ) ;
953
+
924
954
setInterval ( ( ) => {
925
955
if ( playerState . cache ?. isPaused === false ) {
926
956
const event = new Event ( "onprogress" ) ;
@@ -1370,7 +1400,10 @@ Spicetify.SVGIcons = {
1370
1400
let subRequest ;
1371
1401
1372
1402
// product_state was renamed to product_state_service in Spotify 1.2.21
1373
- const productState = Spicetify . Platform . UserAPI ?. _product_state || Spicetify . Platform . UserAPI ?. _product_state_service ;
1403
+ const productState =
1404
+ Spicetify . Platform . UserAPI ?. _product_state ||
1405
+ Spicetify . Platform . UserAPI ?. _product_state_service ||
1406
+ Spicetify . Platform ?. ProductStateAPI . productStateApi ;
1374
1407
1375
1408
Spicetify . AppTitle = {
1376
1409
set : async name => {
0 commit comments