Working simple playlist.
[vlc-remote] / playermainwindow.cpp
index 9558fe1..5df823d 100644 (file)
@@ -94,14 +94,19 @@ PlayerMainWindow::PlayerMainWindow(QWidget *parent) :
 }
 void PlayerMainWindow::init()
 {
-    QSettings settings;
-    QString currentKey = settings.value("config/currentKey").toString();
-    mIp = settings.value("account/"+currentKey).toString();
+
+    mIp= AccountDialog::currentIp();
 
     if ( mIp.isEmpty())
         showConfig();
+
     else
+    {
         mTimer->start(5000);
+        mPlayListMainWindow->init();
+        mBrowserMainWindow->init();
+    }
+
 }
 
 PlayerMainWindow::~PlayerMainWindow()
@@ -186,6 +191,7 @@ void PlayerMainWindow::showConfig()
     mTimer->stop();
     AccountDialog * dialog = new AccountDialog;
     dialog->exec();
+
     init();