Skip to content

Commit

Permalink
Add files via upload
Browse files Browse the repository at this point in the history
  • Loading branch information
z52c authored Jul 31, 2018
1 parent 63eb732 commit 93808d6
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 3 deletions.
2 changes: 1 addition & 1 deletion musicDownloader.pro
Original file line number Diff line number Diff line change
Expand Up @@ -81,4 +81,4 @@ DISTFILES += \
1.jpg \
1.ico

VERSION = 1.8.1
VERSION = 1.8.2
8 changes: 7 additions & 1 deletion neteaseplaylist.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ neteasePlaylist::neteasePlaylist(QObject *parent) : QObject(parent)
d->setUserAgent(UA);
connect(d,SIGNAL(finished()),this,SLOT(htmlGot()));
connect(d,SIGNAL(downloadError(QString)),this,SLOT(htmlGotFailed(QString)));
connect(d,SIGNAL(redirected(QString)),this,SLOT(htmlGotFailed(QString)));
connect(d,SIGNAL(redirected(QString)),this,SLOT(htmlGotRedirected(QString)));
s=new neteaseSong();
connect(s,SIGNAL(finished(int,bool,QString)),this,SLOT(neteaseSongFinished(int,bool,QString)));
}
Expand Down Expand Up @@ -54,6 +54,12 @@ void neteasePlaylist::htmlGotFailed(QString errorString)
finished(-1,infoList);
}

void neteasePlaylist::htmlGotRedirected(QString redirectString)
{
d->init(redirectString,SONGHTMLFILE);
d->doGet();
}

void neteasePlaylist::htmlGot()
{
QFile file(SONGHTMLFILE);
Expand Down
2 changes: 2 additions & 0 deletions neteaseplaylist.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,9 @@ class neteasePlaylist : public QObject
public slots:
void htmlGot();
void htmlGotFailed(QString errorString);
void htmlGotRedirected(QString redirectString);
void neteaseSongFinished(int inFlag,bool inIsGray,QString inString);

private:
QString mid;
downloader *d;
Expand Down
7 changes: 6 additions & 1 deletion neteasesong.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ neteaseSong::neteaseSong(QObject *parent) : QObject(parent)
d->setUserAgent(UA);
connect(d,SIGNAL(finished()),this,SLOT(htmlFileGot()));
connect(d,SIGNAL(downloadError(QString)),this,SLOT(htmlFileGotFailed(QString)));
connect(d,SIGNAL(redirected(QString)),this,SLOT(htmlFileGotFailed(QString)));
connect(d,SIGNAL(redirected(QString)),this,SLOT(htmlGotRedirected(QString)));

search=new qqMusicSearch();
connect(search,SIGNAL(finished(int,QString)),this,SLOT(searchResultGot(int,QString)));
Expand All @@ -20,6 +20,11 @@ void neteaseSong::doJob(QString inMid)
d->doGet();
}

void neteaseSong::htmlGotRedirected(QString redirectString)
{
d->init(redirectString,QString(SONGHTMLFILE));
d->doGet();
}

void neteaseSong::htmlFileGotFailed(QString errorString)
{
Expand Down
1 change: 1 addition & 0 deletions neteasesong.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ class neteaseSong : public QObject
public slots:
void htmlFileGot();
void htmlFileGotFailed(QString errorString);
void htmlGotRedirected(QString redirectString);
void searchResultGot(int inFlag,QString inString);
private:
downloader *d;
Expand Down

0 comments on commit 93808d6

Please sign in to comment.