Skip to content

Commit 24a1c06

Browse files
Merge branch 'linuxmint:master' into master
2 parents 15019e9 + 631cb4c commit 24a1c06

File tree

3 files changed

+22
-7
lines changed

3 files changed

+22
-7
lines changed

AlbumArt3.0@claudiux/files/AlbumArt3.0@claudiux/CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
### v2.4.0~20251122
2+
* Correctly resizes the album cover.
3+
* Fixes [#1674](https://github.com/linuxmint/cinnamon-spices-desklets/issues/1674)
4+
15
### v2.3.6~20251122
26
* Updates the to_string() function.
37

AlbumArt3.0@claudiux/files/AlbumArt3.0@claudiux/desklet.js

Lines changed: 17 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -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

AlbumArt3.0@claudiux/files/AlbumArt3.0@claudiux/metadata.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,6 @@
44
"name": "Album Art for Radio3.0 and Enhanced Sound applets",
55
"description": "A digital photo frame desklet to display an album art, if available",
66
"prevent-decorations": true,
7-
"version": "2.3.6",
7+
"version": "2.4.0",
88
"author": "claudiux"
99
}

0 commit comments

Comments
 (0)