Album art fix for [#6370] Album art fails to load on first track
[vlc-remote] / src / appsettings.cpp
index e910978..23f1598 100644 (file)
@@ -38,14 +38,30 @@ bool AppSettings::isConnected() {
         return false;
     }
 }
+QStringList AppSettings::getAllAccounts() {
+    QStringList accounts;
+    QSettings sets;
+    sets.beginGroup("account");
+    accounts = sets.allKeys();
+    sets.endGroup();
+    return accounts;
+}
 QString AppSettings::getCurrentKey() {
     QSettings sets;
     return sets.value("config/currentKey", "").toString();
 }
+void AppSettings::setCurrentKey(QString key) {
+    QSettings sets;
+    sets.setValue("config/currentKey", key);
+}
 QString AppSettings::getCurrentIp() {
     QSettings sets;
     return sets.value("account/" + getCurrentKey(), "").toString();
 }
+void AppSettings::setCurrentIp(QString ip) {
+    QSettings sets;
+    sets.setValue("account/" + getCurrentKey(), ip);
+}
 VlcDirectory AppSettings::getHomeDirectory() {
     QSettings sets;
     VlcDirectory home;
@@ -91,6 +107,30 @@ bool AppSettings::deleteFavourite(VlcDirectory dir) {
     sets.remove("config/accounts/" + getCurrentKey() + "/favourites/" + dir.name);
     return true;
 }
+int AppSettings::getStatusPollTimeout() {
+    return STATUS_POLL_TIMEOUT;
+}
+int AppSettings::getPingTimeout() {
+    return PING_TIMEOUT;
+}
+int AppSettings::getConnectionTimeout() {
+    return CONNECTION_TIMEOUT;
+}
+int AppSettings::getRetrieveArtTimeout() {
+    return RETRIEVE_ART_TIMEOUT;
+}
+int AppSettings::getRetryNetworkTimeout() {
+    return RETRY_NETWORK_TIMEOUT;
+}
+bool AppSettings::getShowUnknownFileTypes() {
+    return SHOW_UNKNOWN_FILETYPES;
+}
+bool AppSettings::getShowAlbumArt() {
+    return SHOW_ALBUM_ART;
+}
+bool AppSettings::getAlertOnClose() {
+    return ALERT_ON_CLOSE;
+}
 Orientation AppSettings::setOrientation(Orientation orientation) {
     QSettings sets;
     sets.setValue("config/orientation", (int)orientation);