- Fix remove songs from playlist in network remote.
- Update protocol buffer version.
This commit is contained in:
parent
10369cdbbb
commit
7470f67acf
File diff suppressed because it is too large
Load Diff
|
@ -276,7 +276,7 @@ message RequestRateSong {
|
||||||
|
|
||||||
// The message itself
|
// The message itself
|
||||||
message Message {
|
message Message {
|
||||||
optional int32 version = 1 [default=11];
|
optional int32 version = 1 [default=12];
|
||||||
optional MsgType type = 2 [default=UNKNOWN]; // What data is in the message?
|
optional MsgType type = 2 [default=UNKNOWN]; // What data is in the message?
|
||||||
|
|
||||||
optional RequestConnect request_connect = 21;
|
optional RequestConnect request_connect = 21;
|
||||||
|
|
|
@ -258,14 +258,16 @@ void IncomingDataParser::InsertUrls(const pb::remote::Message& msg) {
|
||||||
}
|
}
|
||||||
|
|
||||||
void IncomingDataParser::RemoveSongs(const pb::remote::Message& msg) {
|
void IncomingDataParser::RemoveSongs(const pb::remote::Message& msg) {
|
||||||
const pb::remote::RequestRemoveSongs& request = msg.request_remove_songs();
|
const pb::remote::RequestRemoveSongs& request = msg.request_remove_songs();
|
||||||
|
|
||||||
// Extract urls
|
// Extract urls
|
||||||
QList<int> songs;
|
QList<int> songs;
|
||||||
std::copy(request.songs().begin(), request.songs().end(), songs.begin());
|
for (int i = 0; i<request.songs().size();i++) {
|
||||||
|
songs.append(request.songs(i));
|
||||||
|
}
|
||||||
|
|
||||||
// Insert the urls
|
// Insert the urls
|
||||||
emit RemoveSongs(request.playlist_id(), songs);
|
emit RemoveSongs(request.playlist_id(), songs);
|
||||||
}
|
}
|
||||||
|
|
||||||
void IncomingDataParser::ClientConnect(const pb::remote::Message& msg) {
|
void IncomingDataParser::ClientConnect(const pb::remote::Message& msg) {
|
||||||
|
|
Loading…
Reference in New Issue