|
TTKMusicPlayer
4.3.0.0
TTKMusicPlayer imitates Kugou UI, the music player uses of qmmp core library based on Qt for windows and linux
|
The namespace of the kugou request interface. More...
Functions | |
| void | makeRequestRawHeader (QNetworkRequest *request) noexcept |
| QString | makeSongArtist (const QString &name) |
| QString | makeSongArtist (const QString &in, const QString &name) |
| void | parseFromSongAlbumLrc (TTK::MusicSongInformation *info) |
| void | parseFromSongAlbumInfo (TTK::MusicSongInformation *info, const QString &album) |
| void | parseFromSongAlbumInfo (MusicResultDataItem *item, const QString &hash, const QString &album) |
| void | parseFromSongProperty (TTK::MusicSongInformation *info, int bitrate) |
| void | parseFromSongProperty (TTK::MusicSongInformation *info, const QVariantMap &key) |
| static void | parseFromMovieInfo (TTK::MusicSongInformation *info) |
| static void | parseFromMovieProperty (TTK::MusicSongInformation *info, bool more) |
| static void | parseFromMovieProperty (TTK::MusicSongInformation *info, const QVariantMap &key) |
| static void | parseFromMovieProperty (TTK::MusicSongInformation *info) |
| static void | parseFromMovieProperty (TTK::MusicSongInformation *info, const QVariantMap &key) |
The namespace of the kugou request interface.
|
noexcept |
Make request query data.
Definition at line 13 of file musickgqueryinterface.cpp.
References KG_COOKIE_URL, KG_UA_URL, TTK::Algorithm::mdII(), MDII_UA_KEY, TTK::setContentTypeHeader(), and TTK::setSslConfiguration().
Referenced by parseFromMovieInfo(), parseFromMovieProperty(), parseFromSongAlbumInfo(), parseFromSongAlbumLrc(), parseSongPropertyV1(), parseSongPropertyV2(), parseSongPropertyV3(), MusicKGQueryArtistRequest::queryArtistIntro(), MusicKGQueryToplistRequest::queryToplistInfo(), MusicKGSongCommentsRequest::startToPage(), MusicKGQueryArtistRequest::startToPage(), MusicKGQueryMovieRequest::startToPage(), MusicKGQueryPlaylistRequest::startToPage(), MusicKGQueryAlbumRequest::startToPage(), MusicKGQueryToplistRequest::startToPage(), MusicKGQuerySongRequest::startToPage(), MusicKGQueryArtistListRequest::startToPage(), MusicKGPlaylistCommentsRequest::startToPage(), MusicKGQueryHotArtistListRequest::startToPage(), MusicKGQueryArtistAlbumRequest::startToPage(), MusicKGQueryArtistMovieRequest::startToPage(), MusicKGQueryNewSongRequest::startToPage(), MusicKGQueryPlaylistRecommendRequest::startToPage(), MusicKGQueryNewAlbumRequest::startToPage(), MusicKGQueryPlaylistHighRequest::startToPage(), MusicKGQueryPlaylistRequest::startToQueryInfo(), MusicKGDiscoverListRequest::startToSearch(), MusicSongSuggestRequest::startToSearch(), MusicAbstractMVRadioRequest::startToSearch(), MusicKGQueryPlaylistRequest::startToSearch(), and MusicKGQuerySongRequest::startToSearchByID().
| QString ReqKGInterface::makeSongArtist | ( | const QString & | name | ) |
Make song artist name.
Definition at line 22 of file musickgqueryinterface.cpp.
References TTK::String::charactersReplace().
Referenced by MusicKGQueryMovieRequest::downloadFinished(), MusicKGQueryToplistRequest::downloadFinished(), MusicKGQueryNewSongRequest::downloadFinished(), MusicKGQuerySongRequest::downloadSingleFinished(), parseFromMovieProperty(), and parseFromSongAlbumLrc().
Make song artist name.
Definition at line 27 of file musickgqueryinterface.cpp.
References TTK::String::charactersReplace().
|
static |
Read mv infos from query results.
Definition at line 23 of file musickgquerymovierequest.cpp.
References TTKRegularExpression::captured(), KG_MOVIE_URL, TTK::MusicSongInformation::m_coverUrl, TTK::MusicSongInformation::m_songId, makeRequestRawHeader(), TTKRegularExpression::match(), TTK::Algorithm::mdII(), and TTK::syncNetworkQueryForGet().
Referenced by MusicKGQueryMovieRequest::downloadSingleFinished().
|
static |
Read mv tags(size and bitrate and url) from query results.
Definition at line 17 of file musicmvradioprogramrequest.cpp.
References QJsonParseError::error, QJsonDocument::fromJson(), key, KG_MOVIE_INFO_URL, TTK::MusicSongInformation::m_songId, makeRequestRawHeader(), TTK::Algorithm::md5(), TTK::Algorithm::mdII(), QJsonParseError::NoError, parseFromMovieProperty(), TTK::syncNetworkQueryForGet(), and QJsonDocument::toVariant().
|
static |
Read mv tags(size and bitrate and url) from query results.
Definition at line 72 of file musicmvradioprogramrequest.cpp.
References TTK::MusicSongProperty::m_bitrate, TTK::MusicSongProperty::m_format, TTK::MusicSongProperty::m_size, TTK::MusicSongInformation::m_songProps, TTK::MusicSongProperty::m_url, TTK::Number::sizeByteToLabel(), TTK::String::splitToken(), TTK_BN_1000, TTK_BN_250, TTK_BN_500, and TTK_BN_750.
Referenced by parseFromMovieProperty().
|
static |
Read mv tags(size and bitrate and url) from query results.
Definition at line 55 of file musickgquerymovierequest.cpp.
References TTK::String::charactersReplace(), QJsonParseError::error, QJsonDocument::fromJson(), key, KG_MOVIE_INFO_URL, TTK::MusicSongInformation::m_artistName, TTK::MusicSongInformation::m_songId, TTK::MusicSongInformation::m_songName, makeRequestRawHeader(), makeSongArtist(), TTK::Algorithm::md5(), TTK::Algorithm::mdII(), QJsonParseError::NoError, parseFromMovieProperty(), TTK::syncNetworkQueryForGet(), TTK::toString(), and QJsonDocument::toVariant().
Referenced by MusicMVRadioProgramRequest::downloadFinished(), MusicKGQueryMovieRequest::downloadFinished(), and MusicKGQueryMovieRequest::downloadSingleFinished().
|
static |
Read mv tags(size and bitrate and url) from query results.
Definition at line 116 of file musickgquerymovierequest.cpp.
References TTKTime::formatDuration(), TTK::MusicSongProperty::m_bitrate, TTK::MusicSongInformation::m_duration, TTK::MusicSongProperty::m_format, TTK::MusicSongProperty::m_size, TTK::MusicSongInformation::m_songProps, TTK::MusicSongProperty::m_url, TTK::Number::sizeByteToLabel(), TTK::String::splitToken(), TTK_BN_1000, TTK_BN_250, TTK_BN_500, and TTK_BN_750.
Referenced by parseFromMovieProperty().
| void ReqKGInterface::parseFromSongAlbumInfo | ( | TTK::MusicSongInformation * | info, |
| const QString & | album | ||
| ) |
Read album id and name.
Definition at line 67 of file musickgqueryinterface.cpp.
References TTK::MusicSongInformation::m_albumId, TTK::MusicSongInformation::m_albumName, MusicResultDataItem::m_id, MusicResultDataItem::m_name, TTK::MusicSongInformation::m_songId, MusicResultDataItem::m_time, TTK::MusicSongInformation::m_year, and TTK_DEFAULT_STR.
Referenced by MusicKGQueryPlaylistRequest::downloadDetailsFinished(), MusicKGQueryAlbumRequest::downloadFinished(), and MusicKGQuerySongRequest::downloadSingleFinished().
| void ReqKGInterface::parseFromSongAlbumInfo | ( | MusicResultDataItem * | item, |
| const QString & | hash, | ||
| const QString & | album | ||
| ) |
Read tags(album info) from query results.
Definition at line 82 of file musickgqueryinterface.cpp.
References TTK::String::charactersReplace(), QJsonParseError::error, QJsonDocument::fromJson(), KG_ALBUM_INFO_URL, MusicResultDataItem::m_category, MusicResultDataItem::m_description, MusicResultDataItem::m_id, MusicResultDataItem::m_name, MusicResultDataItem::m_time, makeRequestRawHeader(), TTK::Algorithm::mdII(), QJsonParseError::NoError, qAsConst, TTK::syncNetworkQueryForGet(), TTK::toString(), and QJsonDocument::toVariant().
| void ReqKGInterface::parseFromSongAlbumLrc | ( | TTK::MusicSongInformation * | info | ) |
Read tags(lrc and album pic) from query results.
Definition at line 33 of file musickgqueryinterface.cpp.
References TTK::String::charactersReplace(), QJsonParseError::error, QJsonDocument::fromJson(), KG_SONG_INFO_URL, KG_SONG_LRC_URL, TTK::MusicSongInformation::m_artistId, TTK::MusicSongInformation::m_artistName, TTK::MusicSongInformation::m_coverUrl, TTK::MusicSongInformation::m_lrcUrl, TTK::MusicSongInformation::m_songId, TTK::MusicSongInformation::m_songName, makeRequestRawHeader(), makeSongArtist(), TTK::Algorithm::mdII(), QJsonParseError::NoError, TTK::syncNetworkQueryForGet(), TTK::toString(), QJsonDocument::toVariant(), and TTK_DN_S2MS.
Referenced by MusicKGQueryPlaylistRequest::downloadDetailsFinished(), MusicKGQueryArtistRequest::downloadFinished(), MusicKGQueryAlbumRequest::downloadFinished(), and MusicKGQuerySongRequest::downloadFinished().
| void ReqKGInterface::parseFromSongProperty | ( | TTK::MusicSongInformation * | info, |
| int | bitrate | ||
| ) |
Read tags(size and bitrate and url) from query results.
Definition at line 321 of file musickgqueryinterface.cpp.
References TTK::MusicSongInformation::m_formatProps, TTK::MusicSongInformation::m_songId, parseSongProperty(), TTK_BN_0, TTK_BN_1000, TTK_BN_128, TTK_BN_192, and TTK_BN_320.
Referenced by MusicKGQueryPlaylistRequest::downloadDetailsFinished(), MusicKGQueryArtistRequest::downloadFinished(), MusicKGQueryAlbumRequest::downloadFinished(), MusicKGQuerySongRequest::downloadFinished(), MusicKGQueryToplistRequest::downloadFinished(), MusicKGQueryNewSongRequest::downloadFinished(), MusicKGQuerySongRequest::downloadSingleFinished(), MusicKGQueryAlbumRequest::startToQueryResult(), MusicKGQueryArtistRequest::startToQueryResult(), MusicKGQueryPlaylistRequest::startToQueryResult(), MusicKGQuerySongRequest::startToQueryResult(), MusicKGQueryToplistRequest::startToQueryResult(), and MusicKGQueryNewSongRequest::startToQueryResult().
| void ReqKGInterface::parseFromSongProperty | ( | TTK::MusicSongInformation * | info, |
| const QVariantMap & | key | ||
| ) |
Read tags(size and bitrate and url) from query results.
Definition at line 352 of file musickgqueryinterface.cpp.
References TTK::MusicSongInformation::m_formatProps.
1.8.8