Skip to content

Commit 28659cf

Browse files
authored
Added Spotify Music search function
1 parent 001bacd commit 28659cf

5 files changed

Lines changed: 428 additions & 4 deletions

File tree

Changelog.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
1.3.3
2+
- added Spotify music search function when spotify account is connected
3+
14
1.3.2
25
- added support for Spotify accounts, play your spotify playlists on Sonos via Toon.
36
Setup accounts via the Sonos menu item and select your Spotify user at the Favourites screen for playback

FavoritesScreen.qml

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,14 +18,20 @@ Screen {
1818
}
1919

2020
onCustomButtonClicked: {
21-
if (app.messageScreen) {
22-
app.messageScreen.show();
21+
if (app.spotifyStatus == "configured") {
22+
if (app.spotifyMusicSearchScreen) app.spotifyMusicSearchScreen.show();
23+
} else {
24+
if (app.messageScreen) app.messageScreen.show();
2325
}
2426
}
2527

2628

2729
onShown: {
28-
addCustomTopRightButton("Audiobericht");
30+
if (app.spotifyStatus == "configured") {
31+
addCustomTopRightButton("Zoek Muziek");
32+
} else {
33+
addCustomTopRightButton("Audiobericht");
34+
}
2935
screenStateController.screenColorDimmedIsReachable = false;
3036
pageThrobber.visible = true;
3137
updateFavoriteslist();

SonosApp.qml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@ App {
2121
property url thumbnailIcon: "qrc:/tsc/SonosThumb.png"
2222
property url spotifyEditUsersScreenUrl : "SpotifyEditUsersScreen.qml"
2323
property url spotifyCredentialsScreenUrl : "SpotifyCredentialsScreen.qml"
24+
property url spotifyMusicSearchScreenUrl : "SpotifyMusicSearchScreen.qml"
25+
property SpotifyMusicSearchScreen spotifyMusicSearchScreen
2426
property SpotifyEditUsersScreen spotifyEditUsersScreen
2527
property SpotifyCredentialsScreen spotifyCredentialsScreen
2628
property MenuScreen menuScreen
@@ -122,6 +124,7 @@ App {
122124
registry.registerWidget("screen", spotifySelectUserUrl, this, "spotifySelectUser");
123125
registry.registerWidget("screen", mediaSelectZoneUrl, this, "mediaSelectZone");
124126
registry.registerWidget("screen", spotifyEditUsersScreenUrl, this, "spotifyEditUsersScreen");
127+
registry.registerWidget("screen", spotifyMusicSearchScreenUrl, this, "spotifyMusicSearchScreen");
125128
registry.registerWidget("screen", spotifyCredentialsScreenUrl, this, "spotifyCredentialsScreen");
126129
registry.registerWidget("menuItem", null, this, null, {objectName: "sonosMenuItem", label: qsTr("Sonos"), image: thumbnailIcon, screenUrl: menuScreenUrl, weight: 120});
127130
registry.registerWidget("tile", tileUrl, this, null, {thumbLabel: qsTr("Sonos"), thumbIcon: thumbnailIcon, thumbCategory: "general", thumbWeight: 30, baseTileWeight: 10, thumbIconVAlignment: "center"});

0 commit comments

Comments
 (0)