summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorYoann Lopes <yoann.lopes@nokia.com>2012-05-16 14:07:39 +0200
committerYoann Lopes <yoann.lopes@nokia.com>2012-05-16 14:07:39 +0200
commitad5e96ea6b7e8b75972babe870338ceda00349fc (patch)
tree1dd7e729f890924480721d82a21ba5b1acab20d6
parentba42f561ea197d1e797b5ea945e600ee6d4d55f1 (diff)
Allow to use 320kbps quality for streaming and syncing.
-rw-r--r--libQtSpotify/qspotifysession.cpp2
-rw-r--r--libQtSpotify/qspotifysession.h3
-rw-r--r--qml/SettingsPage.qml16
3 files changed, 13 insertions, 8 deletions
diff --git a/libQtSpotify/qspotifysession.cpp b/libQtSpotify/qspotifysession.cpp
index a6b73be..ad1338b 100644
--- a/libQtSpotify/qspotifysession.cpp
+++ b/libQtSpotify/qspotifysession.cpp
@@ -701,7 +701,7 @@ void QSpotifySession::setSyncQuality(StreamingQuality q)
m_syncQuality = q;
QSettings s;
s.setValue("syncQuality", int(q));
- sp_session_preferred_offline_bitrate(m_sp_session, sp_bitrate(q), false);
+ sp_session_preferred_offline_bitrate(m_sp_session, sp_bitrate(q), true);
emit syncQualityChanged();
}
diff --git a/libQtSpotify/qspotifysession.h b/libQtSpotify/qspotifysession.h
index 9ba25d5..8bfa887 100644
--- a/libQtSpotify/qspotifysession.h
+++ b/libQtSpotify/qspotifysession.h
@@ -114,7 +114,8 @@ public:
enum StreamingQuality {
Unknown = -1,
LowQuality = SP_BITRATE_96k,
- HighQuality = SP_BITRATE_160k
+ HighQuality = SP_BITRATE_160k,
+ UltraQuality = SP_BITRATE_320k
};
enum ConnectionRule {
diff --git a/qml/SettingsPage.qml b/qml/SettingsPage.qml
index 03dd94b..ad21fb9 100644
--- a/qml/SettingsPage.qml
+++ b/qml/SettingsPage.qml
@@ -123,20 +123,24 @@ Page {
Selector {
title: "Stream"
model: ListModel {
- ListElement { name: "Low bandwidth"; value: SpotifySession.LowQuality }
- ListElement { name: "High bandwidth"; value: SpotifySession.HighQuality }
+ ListElement { name: "Low quality (96kbps)"; value: SpotifySession.LowQuality }
+ ListElement { name: "Normal quality (160kbps)"; value: SpotifySession.HighQuality }
+ ListElement { name: "High quality (320kbps)"; value: SpotifySession.UltraQuality }
}
- selectedIndex: spotifySession.streamingQuality == SpotifySession.LowQuality ? 0 : 1
+ selectedIndex: spotifySession.streamingQuality == SpotifySession.LowQuality ? 0
+ : spotifySession.streamingQuality == SpotifySession.HighQuality ? 1 : 2
onSelectedIndexChanged: spotifySession.streamingQuality = model.get(selectedIndex).value
}
Selector {
title: "Offline Sync"
model: ListModel {
- ListElement { name: "Low Quality"; value: SpotifySession.LowQuality }
- ListElement { name: "High Quality"; value: SpotifySession.HighQuality }
+ ListElement { name: "Low quality (96kbps)"; value: SpotifySession.LowQuality }
+ ListElement { name: "Normal quality (160kbps)"; value: SpotifySession.HighQuality }
+ ListElement { name: "High quality (320kbps)"; value: SpotifySession.UltraQuality }
}
- selectedIndex: spotifySession.syncQuality == SpotifySession.LowQuality ? 0 : 1
+ selectedIndex: spotifySession.syncQuality == SpotifySession.LowQuality ? 0
+ : spotifySession.syncQuality == SpotifySession.HighQuality ? 1 : 2
onSelectedIndexChanged: spotifySession.syncQuality = model.get(selectedIndex).value
}