@@ -78,6 +78,8 @@ class AlbumArtRadio30 extends Desklet.Desklet {
7878 GLib . mkdir_with_parents ( ALBUMART_PICS_DIR , 0o755 ) ;
7979 this . realWidth = 1280 ;
8080 this . realHeight = 720 ;
81+ this . oldRealWidth = 1280 ;
82+ this . oldRealHeight = 720 ;
8183
8284 this . MSG_DISPLAY_AT_FULL_SIZE = _ ( "Display Album Art at full size" ) ;
8385 this . MSG_DONT_DISPLAY_THIS_IMAGE = _ ( "Do not display this image" ) ;
@@ -150,10 +152,10 @@ class AlbumArtRadio30 extends Desklet.Desklet {
150152
151153 this . _setup_dir_monitor ( ) ;
152154 if ( this . currentPicture ) {
153- this . currentPicture . destroy ( ) ;
155+ try { this . currentPicture . destroy ( ) } catch ( e ) { } ;
154156 }
155157 if ( this . _photoFrame ) {
156- this . _photoFrame . destroy ( ) ;
158+ try { this . _photoFrame . destroy ( ) } catch ( e ) { } ;
157159 }
158160 this . isLooping = true ;
159161 this . setup_display ( ) ;
@@ -198,8 +200,8 @@ class AlbumArtRadio30 extends Desklet.Desklet {
198200 if ( this . _bin != null ) {
199201 if ( Tweener . getTweenCount ( this . _bin ) > 0 )
200202 Tweener . removeTweens ( this . _bin ) ;
201- this . _bin . destroy_all_children ( ) ;
202- this . _bin . destroy ( ) ;
203+ try { this . _bin . destroy_all_children ( ) } catch ( e ) { } ;
204+ try { this . _bin . destroy ( ) } catch ( e ) { } ;
203205 this . _bin = null ;
204206 }
205207
@@ -293,10 +295,18 @@ class AlbumArtRadio30 extends Desklet.Desklet {
293295
294296 if ( ! this . isLooping ) return false ;
295297 this . _update ( ) ;
296- if ( this . isLooping )
298+
299+ if ( this . isLooping ) {
300+ if ( this . oldRealWidth != this . realWidth || this . oldRealHeight != this . realHeight ) {
301+ this . oldRealWidth = this . realWidth ;
302+ this . oldRealHeight = this . realHeight ;
303+ this . on_setting_changed ( ) ;
304+ }
305+
297306 this . update_id = timeout_add_seconds ( this . delay , ( ) => { this . _update_loop ( ) } ) ;
298- else
307+ } else {
299308 return false ;
309+ }
300310 }
301311
302312 _size_pic ( image ) {
@@ -422,6 +432,7 @@ class AlbumArtRadio30 extends Desklet.Desklet {
422432 } else {
423433 if ( this . _bin != null ) this . _bin . set_child ( this . currentPicture ) ;
424434 }
435+
425436 this . updateInProgress = false ;
426437 }
427438
0 commit comments