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 unity query mv download data from net. More...
#include <musicunityquerymovierequest.h>
Public Member Functions | |
MusicUnityQueryMovieRequest (QObject *parent=nullptr) | |
virtual void | startToPage (int offset) override |
![]() | |
MusicQueryMovieRequest (QObject *parent=nullptr) | |
virtual void | startToSearch (const QString &value) override |
![]() | |
MusicAbstractQueryRequest (QObject *parent=nullptr) | |
virtual void | startToSearchByID (const QString &value) |
virtual void | startToQueryResult (TTK::MusicSongInformation *info, int bitrate) |
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 |
Protected Member Functions | |
void | setToUnity () noexcept |
bool | needToUnity () const noexcept |
void | resetUnity () noexcept |
![]() | |
QString | serverToString () const |
bool | fetchUrlPathSize (TTK::MusicSongProperty *prop, const QString &duration) const |
bool | fetchUrlPathSize (TTK::MusicSongPropertyList *props, const QString &duration) const |
Private Slots | |
void | downLoadUnityFinished () |
Private Member Functions | |
void | findAllPlugins (int count) |
Private Attributes | |
bool | m_isUnity |
int | m_pluginSelector |
int | m_startPageIndex |
QString | m_value |
Additional Inherited Members | |
![]() | |
enum | QueryServer { QueryServer::WY, QueryServer::KW, QueryServer::KG } |
enum | QueryType { QueryType::Music, QueryType::Movie, QueryType::Lrc, QueryType::Other } |
enum | QueryMode { QueryMode::Normal, QueryMode::Meta } |
![]() | |
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) |
![]() | |
void | createMovieItem (const MusicResultDataItem &item) |
![]() | |
void | clearItems () |
void | createResultItem (const MusicResultInfoItem &songItem) |
![]() | |
void | downLoadDataChanged (const QString &bytes) |
void | downLoadRawDataChanged (const QByteArray &bytes) |
![]() | |
QString | m_queryValue |
QString | m_queryServer |
QueryType | m_queryType |
QueryMode | m_queryMode |
TTK::MusicSongInformationList | m_items |
![]() | |
int | m_pageSize |
int | m_totalSize |
int | m_pageIndex |
![]() | |
QVariantMap | m_rawData |
volatile bool | m_interrupt |
volatile TTK::NetworkCode | m_stateCode |
QNetworkReply * | m_reply |
QNetworkAccessManager | m_manager |
The class of the unity query mv download data from net.
Definition at line 27 of file musicunityquerymovierequest.h.
|
explicit |
Object constructor.
Definition at line 24 of file musicunityquerymovierequest.cpp.
References MusicPageQueryRequest::m_pageSize, and SONG_PAGE_SIZE.
|
privateslot |
Download data from net finished.
Definition at line 75 of file musicunityquerymovierequest.cpp.
References TTK::String::charactersReplace(), MusicAbstractQueryRequest::createResultItem(), TTKAbstractNetwork::deleteAll(), TTKAbstractNetwork::downLoadDataChanged(), TTKAbstractNetwork::downLoadFinished(), MusicAbstractQueryRequest::fetchUrlPathSize(), findAllPlugins(), TTKTime::formatDuration(), HTTP_PROTOCOL, HTTP_PROTOCOL_PREFIX, TTK::String::isNetworkUrl(), TTK::MusicSongInformation::m_artistName, TTK::MusicSongProperty::m_bitrate, TTK::MusicSongInformation::m_coverUrl, TTK::MusicSongInformation::m_duration, TTK::MusicSongProperty::m_format, MusicAbstractQueryRequest::m_items, m_pluginSelector, TTKAbstractNetwork::m_reply, TTK::MusicSongInformation::m_songId, TTK::MusicSongInformation::m_songName, TTK::MusicSongInformation::m_songProps, MusicPageQueryRequest::m_totalSize, TTK::MusicSongProperty::m_url, m_value, QJson::Parser::parse(), ReqBLInterface::parseFromMovieInfo(), ReqBLInterface::parseFromMovieProperty(), qAsConst, MusicAbstractQueryRequest::serverToString(), TTK::String::splitToken(), TTK::toString(), TTK_BN_250, TTK_BN_750, TTK_DN_S2MS, TTK_HIGH_LEVEL, TTK_INFO_STREAM, TTK_NETWORK_QUERY_CHECK, and TTK_STR_CAT.
Referenced by startToPage().
|
private |
Find all plugins.
Definition at line 223 of file musicunityquerymovierequest.cpp.
References MusicAbstractQueryRequest::m_items, MusicPageQueryRequest::m_pageSize, m_pluginSelector, and setToUnity().
Referenced by downLoadUnityFinished().
|
inlineprotectednoexcept |
Check unity query mode is valid or not.
Definition at line 55 of file musicunityquerymovierequest.h.
Referenced by MusicKGQueryMovieRequest::startToPage(), MusicWYQueryMovieRequest::startToPage(), and MusicKWQueryMovieRequest::startToPage().
|
inlineprotectednoexcept |
Reset unity query mode.
Definition at line 62 of file musicunityquerymovierequest.h.
Referenced by MusicKGQueryMovieRequest::startToSearch(), MusicWYQueryMovieRequest::startToSearch(), and MusicKWQueryMovieRequest::startToSearch().
|
inlineprotectednoexcept |
Set to unity query mode.
Definition at line 46 of file musicunityquerymovierequest.h.
References TTK_HIGH_LEVEL.
Referenced by MusicKGQueryMovieRequest::downLoadFinished(), MusicKWQueryMovieRequest::downLoadFinished(), MusicWYQueryMovieRequest::downLoadFinished(), and findAllPlugins().
|
overridevirtual |
Start to search data by offset page.
Reimplemented from MusicPageQueryRequest.
Reimplemented in MusicKGQueryMovieRequest, MusicKWQueryMovieRequest, and MusicWYQueryMovieRequest.
Definition at line 33 of file musicunityquerymovierequest.cpp.
References BL_MOVIE_URL, TTKAbstractNetwork::deleteAll(), downLoadUnityFinished(), TTKAbstractNetwork::m_manager, MusicPageQueryRequest::m_pageIndex, MusicPageQueryRequest::m_pageSize, m_pluginSelector, MusicAbstractQueryRequest::m_queryServer, MusicAbstractQueryRequest::m_queryValue, TTKAbstractNetwork::m_reply, MusicPageQueryRequest::m_totalSize, m_value, TTK::makeContentTypeHeader(), ReqBLInterface::makeRequestRawHeader(), TTK::Algorithm::mdII(), ReqYYTInterface::MODULE, ReqBLInterface::MODULE, ReqYYTInterface::MOVIE_DATA_URL, ReqYYTInterface::MOVIE_URL, QtNetworkErrorConnect, MusicAbstractNetwork::replyError(), TTK::setSslConfiguration(), TTK_INFO_STREAM, and TTK_SLOT.
Referenced by MusicKGQueryMovieRequest::startToPage(), MusicWYQueryMovieRequest::startToPage(), and MusicKWQueryMovieRequest::startToPage().
|
private |
Definition at line 80 of file musicunityquerymovierequest.h.
|
private |
Definition at line 81 of file musicunityquerymovierequest.h.
Referenced by downLoadUnityFinished(), findAllPlugins(), and startToPage().
|
private |
Definition at line 82 of file musicunityquerymovierequest.h.
|
private |
Definition at line 83 of file musicunityquerymovierequest.h.
Referenced by downLoadUnityFinished(), and startToPage().