mirror of
https://github.com/clementine-player/Clementine
synced 2025-01-31 19:45:31 +01:00
Network remote: Don't send downloader the first data since it's not needed.
This commit is contained in:
parent
136fca6dc2
commit
c152bc26d9
@ -86,7 +86,7 @@ void IncomingDataParser::Parse(const pb::remote::Message& msg) {
|
||||
// Now check what's to do
|
||||
switch (msg.type()) {
|
||||
case pb::remote::CONNECT:
|
||||
ClientConnect(msg);
|
||||
ClientConnect(msg, client);
|
||||
break;
|
||||
case pb::remote::DISCONNECT:
|
||||
close_connection_ = true;
|
||||
@ -260,16 +260,18 @@ void IncomingDataParser::RemoveSongs(const pb::remote::Message& msg) {
|
||||
emit RemoveSongs(request.playlist_id(), songs);
|
||||
}
|
||||
|
||||
void IncomingDataParser::ClientConnect(const pb::remote::Message& msg) {
|
||||
void IncomingDataParser::ClientConnect(const pb::remote::Message& msg, RemoteClient* client) {
|
||||
// Always sned the Clementine infos
|
||||
emit SendClementineInfo();
|
||||
|
||||
// Check if we should send the first data
|
||||
if (!msg.request_connect().has_send_playlist_songs() // legacy
|
||||
|| msg.request_connect().send_playlist_songs()) {
|
||||
emit SendFirstData(true);
|
||||
} else {
|
||||
emit SendFirstData(false);
|
||||
if (!client->isDownloader()) {
|
||||
if (!msg.request_connect().has_send_playlist_songs() // legacy
|
||||
|| msg.request_connect().send_playlist_songs()) {
|
||||
emit SendFirstData(true);
|
||||
} else {
|
||||
emit SendFirstData(false);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -61,7 +61,7 @@ signals:
|
||||
void SetShuffleMode(const pb::remote::Shuffle& shuffle);
|
||||
void InsertUrls(const pb::remote::Message& msg);
|
||||
void RemoveSongs(const pb::remote::Message& msg);
|
||||
void ClientConnect(const pb::remote::Message& msg);
|
||||
void ClientConnect(const pb::remote::Message& msg, RemoteClient* client);
|
||||
void SendPlaylists(const pb::remote::Message& msg);
|
||||
void OpenPlaylist(const pb::remote::Message& msg);
|
||||
void ClosePlaylist(const pb::remote::Message& msg);
|
||||
|
Loading…
x
Reference in New Issue
Block a user