TTKMusicPlayer
4.1.3.0
TTKMusicPlayer imitates Kugou UI, the music player uses of qmmp core library based on Qt for windows and linux
|
The class of the kuwo query playlist download data from net. More...
#include <musickwqueryplaylistrequest.h>
Public Slots | |
virtual void | downLoadFinished () overridefinal |
![]() | |
virtual void | downLoadFinished () override |
![]() | |
virtual void | replyError (QNetworkReply::NetworkError error) override |
virtual void | sslErrors (QNetworkReply *reply, const QList< QSslError > &errors) override |
![]() | |
virtual void | downLoadFinished () |
virtual void | replyError (QNetworkReply::NetworkError error) |
virtual void | sslErrors (QNetworkReply *reply, const QList< QSslError > &errors) |
void | sslErrorsString (QNetworkReply *reply, const QList< QSslError > &errors) |
Public Member Functions | |
MusicKWQueryPlaylistRequest (QObject *parent=nullptr) | |
virtual void | startToPage (int offset) overridefinal |
virtual void | startToSearch (const QString &value) overridefinal |
virtual void | startToSearchByID (const QString &value) overridefinal |
virtual void | startToQueryResult (TTK::MusicSongInformation *info, int bitrate) overridefinal |
virtual void | startToQueryInfo (MusicResultDataItem &item) overridefinal |
![]() | |
MusicQueryPlaylistRequest (QObject *parent=nullptr) | |
![]() | |
MusicAbstractQueryRequest (QObject *parent=nullptr) | |
void | setQueryMode (QueryMode mode) |
QueryMode | queryMode () const |
void | setQueryType (QueryType type) |
QueryType | queryType () const |
QString | queryServer () const |
QString | queryValue () const |
void | setItems (const TTK::MusicSongInformationList &items) |
const TTK::MusicSongInformationList & | items () const |
bool | isEmpty () const |
![]() | |
MusicPageQueryRequest (QObject *parent=nullptr) | |
int | pageTotalSize () const noexcept |
int | pageSize () const noexcept |
int | totalSize () const noexcept |
int | pageIndex () const noexcept |
bool | pageValid () const noexcept |
![]() | |
MusicAbstractNetwork (QObject *parent=nullptr) | |
![]() | |
TTKAbstractNetwork (QObject *parent=nullptr) | |
~TTKAbstractNetwork () | |
virtual void | deleteAll () |
void | setHeader (const QString &key, const QVariant &value) |
const QVariant | header (const QString &key) const |
Private Slots | |
void | downloadDetailsFinished () |
void | downloadMoreDetailsFinished () |
Private Member Functions | |
void | morePlaylistDetails (const QString &pid) |
The class of the kuwo query playlist download data from net.
Definition at line 28 of file musickwqueryplaylistrequest.h.
|
explicit |
Object constructor.
Definition at line 3 of file musickwqueryplaylistrequest.cpp.
References MusicPageQueryRequest::m_pageSize, MusicAbstractQueryRequest::m_queryServer, QUERY_KW_INTERFACE, and SONG_PAGE_SIZE.
|
privateslot |
Download data from net finished.
Definition at line 134 of file musickwqueryplaylistrequest.cpp.
References TTK::String::charactersReplace(), MusicAbstractQueryRequest::createResultItem(), TTKAbstractNetwork::downLoadDataChanged(), MusicAbstractQueryRequest::downLoadFinished(), TTKTime::formatDuration(), KW_SONG_LRC_URL, TTK::MusicSongInformation::m_albumId, TTK::MusicSongInformation::m_albumName, TTK::MusicSongInformation::m_artistId, TTK::MusicSongInformation::m_artistName, TTK::MusicSongInformation::m_coverUrl, TTK::MusicSongInformation::m_duration, MusicAbstractQueryRequest::m_items, TTK::MusicSongInformation::m_lrcUrl, TTK::MusicSongInformation::m_songId, TTK::MusicSongInformation::m_songName, TTK::MusicSongInformation::m_trackNumber, TTK::MusicSongInformation::m_year, ReqKWInterface::makeCoverPixmapUrl(), ReqKWInterface::makeSongArtist(), TTK::Algorithm::mdII(), QJson::Parser::parse(), ReqKWInterface::parseFromSongProperty(), qAsConst, MusicAbstractQueryRequest::serverToString(), TTK::toString(), TTK_DN_S2MS, TTK_INFO_STREAM, TTK_NETWORK_QUERY_CHECK, and TTKObjectCast.
Referenced by startToSearch().
|
finaloverridevirtualslot |
Download data from net finished.
Definition at line 94 of file musickwqueryplaylistrequest.cpp.
References TTKAbstractNetwork::deleteAll(), MusicAbstractQueryRequest::downLoadFinished(), TTKAbstractNetwork::m_reply, MusicPageQueryRequest::m_totalSize, morePlaylistDetails(), QJson::Parser::parse(), qAsConst, TTK::toString(), TTK_INFO_STREAM, and TTK_NETWORK_QUERY_CHECK.
Referenced by startToPage().
|
privateslot |
Download data from net finished.
Definition at line 191 of file musickwqueryplaylistrequest.cpp.
References MusicQueryPlaylistRequest::createPlaylistItem(), TTKDateTime::format(), MusicResultDataItem::m_category, MusicResultDataItem::m_count, MusicResultDataItem::m_coverUrl, MusicResultDataItem::m_description, MusicResultDataItem::m_id, MusicResultDataItem::m_name, MusicResultDataItem::m_nickName, MusicResultDataItem::m_time, QJson::Parser::parse(), TTK::toString(), TTK_DATE_FORMAT, TTK_DN_S2MS, TTK_INFO_STREAM, and TTKObjectCast.
Referenced by morePlaylistDetails().
|
private |
Get more playlisy details.
Definition at line 229 of file musickwqueryplaylistrequest.cpp.
References downloadMoreDetailsFinished(), KW_PLAYLIST_INFO_URL, TTKAbstractNetwork::m_manager, ReqKWInterface::makeRequestRawHeader(), TTK::Algorithm::mdII(), QtNetworkErrorConnect, MusicAbstractNetwork::replyError(), TTK_INFO_STREAM, and TTK_SLOT.
Referenced by downLoadFinished().
|
finaloverridevirtual |
Start to search data by offset page.
Reimplemented from MusicPageQueryRequest.
Definition at line 10 of file musickwqueryplaylistrequest.cpp.
References TTKAbstractNetwork::deleteAll(), downLoadFinished(), KW_PLAYLIST_URL, TTKAbstractNetwork::m_manager, MusicPageQueryRequest::m_pageIndex, MusicPageQueryRequest::m_pageSize, MusicAbstractQueryRequest::m_queryValue, TTKAbstractNetwork::m_reply, MusicPageQueryRequest::m_totalSize, ReqKWInterface::makeRequestRawHeader(), TTK::Algorithm::mdII(), QtNetworkErrorConnect, MusicAbstractNetwork::replyError(), TTK_INFO_STREAM, and TTK_SLOT.
|
finaloverridevirtual |
Start to query playlist info.
Implements MusicQueryPlaylistRequest.
Definition at line 60 of file musickwqueryplaylistrequest.cpp.
References TTKAbstractNetwork::downLoadFinished(), TTKDateTime::format(), KW_PLAYLIST_INFO_URL, MusicResultDataItem::m_count, MusicResultDataItem::m_coverUrl, MusicResultDataItem::m_description, MusicResultDataItem::m_id, MusicResultDataItem::m_name, MusicResultDataItem::m_nickName, MusicResultDataItem::m_time, ReqKWInterface::makeRequestRawHeader(), TTK::Algorithm::mdII(), QJson::Parser::parse(), TTK::syncNetworkQueryForGet(), TTK_DATE_FORMAT, TTK_DN_S2MS, and TTK_INFO_STREAM.
|
finaloverridevirtual |
Start to download query result data.
Reimplemented from MusicAbstractQueryRequest.
Definition at line 47 of file musickwqueryplaylistrequest.cpp.
References TTKAbstractNetwork::downLoadFinished(), MusicAbstractQueryRequest::fetchUrlPathSize(), TTK::MusicSongInformation::m_duration, TTK::MusicSongInformation::m_songId, TTK::MusicSongInformation::m_songProps, ReqKWInterface::parseFromSongProperty(), MusicAbstractQueryRequest::startToQueryResult(), TTK_INFO_STREAM, and TTK_NETWORK_QUERY_CHECK.
|
finaloverridevirtual |
Start to search data by input data.
Implements MusicAbstractQueryRequest.
Definition at line 27 of file musickwqueryplaylistrequest.cpp.
References TTKAbstractNetwork::deleteAll(), downloadDetailsFinished(), KW_PLAYLIST_INFO_URL, TTKAbstractNetwork::m_manager, ReqKWInterface::makeRequestRawHeader(), TTK::Algorithm::mdII(), QtNetworkErrorConnect, MusicAbstractNetwork::replyError(), TTK_INFO_STREAM, and TTK_SLOT.
|
finaloverridevirtual |
Start to search data by input value.
Reimplemented from MusicQueryPlaylistRequest.
Definition at line 42 of file musickwqueryplaylistrequest.cpp.
References MusicQueryPlaylistRequest::startToSearchByID().