Browse Source

rm unused

master
Robin Thoni 9 years ago
parent
commit
6de692f7fa
2 changed files with 3 additions and 17 deletions
  1. 3
    15
      radio.cpp
  2. 0
    2
      radio.h

+ 3
- 15
radio.cpp View File

@@ -14,7 +14,7 @@ Radio::Radio(QObject *parent) : QObject(parent), logo(0, 0)
14 14
     songTimer->setSingleShot(true);
15 15
     connect(songTimer, SIGNAL(timeout()), this, SLOT(songEnded()));
16 16
     player = new QMediaPlayer(this);
17
-    player->setVolume(50);
17
+    player->setVolume(100);
18 18
 }
19 19
 
20 20
 QString Radio::getName()
@@ -121,7 +121,7 @@ void Radio::updateNextSongs()
121 121
 {
122 122
     songsTries = 0;
123 123
     QUrl url = apiBase;
124
-    QUrlQuery query;
124
+    QUrlQuery query(url.query());
125 125
     query.addQueryItem("act", "get_plist");
126 126
     query.addQueryItem("id_wr", QString::number(id));
127 127
     url.setQuery(query);
@@ -175,9 +175,9 @@ void Radio::logoError(QNetworkReply::NetworkError)
175 175
 
176 176
 void Radio::songsFinished()
177 177
 {
178
+    qDeleteAll(nextSongs);
178 179
     QNetworkReply* reply = (QNetworkReply*)sender();
179 180
     YAML::Node itms = YAML::Load(reply->readAll().constData())["itms"];
180
-    qDeleteAll(nextSongs);
181 181
     for(unsigned i = 1;i < itms.size(); ++i)
182 182
     {
183 183
         YAML::Node itm = itms[i];
@@ -203,18 +203,6 @@ void Radio::songsError(QNetworkReply::NetworkError)
203 203
     }
204 204
 }
205 205
 
206
-/*void Radio::streamRead()
207
-{
208
-    if(stream->header(QNetworkRequest::LocationHeader).toUrl().isEmpty())
209
-        emit streamData(stream->readAll());
210
-    else
211
-    {
212
-        streamUrl = stream->header(QNetworkRequest::LocationHeader).toUrl();
213
-        stopStream();
214
-        startStream();
215
-    }
216
-}*/
217
-
218 206
 void Radio::streamError()
219 207
 {
220 208
     if(streamTries < 3)

+ 0
- 2
radio.h View File

@@ -50,7 +50,6 @@ public slots:
50 50
     void startStream();
51 51
     void stopStream();
52 52
 
53
-public slots:
54 53
     void setNetworkManager(QNetworkAccessManager* m);
55 54
 
56 55
 private slots:
@@ -60,7 +59,6 @@ private slots:
60 59
     void songsFinished();
61 60
     void songsError(QNetworkReply::NetworkError);
62 61
 
63
-    //void streamRead();
64 62
     void streamError();
65 63
 
66 64
     void songEnded();

Loading…
Cancel
Save