@@ -345,28 +345,41 @@ fc.updateFrame = function() {
345345 // fetch the latest frame state, and update as needed
346346 frame . fetch ( )
347347 . then ( function ( new_state ) {
348- pm . installPlugins ( new_state . plugins )
349- . then ( function ( ) {
350- debug ( '-----> plugins installed' ) ;
351- pm . initPlugins ( frame . state . plugins , fc . pluginApi )
352- . then ( function ( ) {
353- // once we're done updating/initializing the frame plugins, call change artwork
354- // TODO: we could add logic here to only update necessary items...
355- // For now, changeArtwork should exit if old and new artwork are the same
356- // TODO: DRY with else below
357- if ( frame . state . _current_artwork ) {
358- fc . changeArtwork ( )
359- . then ( function ( ) {
360- // success changing artwork
361- } )
362- . catch ( function ( ) {
363- // error changing artwork, reset frame.state._current_artwork to true current
364- frame . state . _current_artwork = fc . current_artwork ;
365- } ) ;
366- }
367- } ) ;
368- } )
369- . catch ( debug ) ;
348+ if ( frame . state . _current_artwork ) {
349+ fc . changeArtwork ( )
350+ . then ( function ( ) {
351+ // success changing artwork
352+ } )
353+ . catch ( function ( ) {
354+ // error changing artwork, reset frame.state._current_artwork to true current
355+ frame . state . _current_artwork = fc . current_artwork ;
356+ } ) ;
357+ }
358+ // Until we get the base extension module ready, which will handle init status,
359+ // don't install/init plugins on frame update
360+ //
361+ // pm.installPlugins(new_state.plugins)
362+ // .then(function() {
363+ // debug('-----> plugins installed');
364+ // pm.initPlugins(frame.state.plugins, fc.pluginApi)
365+ // .then(function() {
366+ // // once we're done updating/initializing the frame plugins, call change artwork
367+ // // TODO: we could add logic here to only update necessary items...
368+ // // For now, changeArtwork should exit if old and new artwork are the same
369+ // // TODO: DRY with else below
370+ // if (frame.state._current_artwork) {
371+ // fc.changeArtwork()
372+ // .then(function() {
373+ // // success changing artwork
374+ // })
375+ // .catch(function() {
376+ // // error changing artwork, reset frame.state._current_artwork to true current
377+ // frame.state._current_artwork = fc.current_artwork;
378+ // });
379+ // }
380+ // });
381+ // })
382+ // .catch(debug);
370383 } ) ;
371384} ;
372385
0 commit comments