- Fix remove songs from playlist in network remote.

- Update protocol buffer version.
This commit is contained in:
Andreas 2013-10-31 19:52:02 +01:00
parent 10369cdbbb
commit 7470f67acf
3 changed files with 1690 additions and 7 deletions

1681
dist/windows/clementine-portable.nsi vendored Normal file

File diff suppressed because it is too large Load Diff

View File

@ -276,7 +276,7 @@ message RequestRateSong {
// The message itself
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 RequestConnect request_connect = 21;

View File

@ -258,14 +258,16 @@ void IncomingDataParser::InsertUrls(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
QList<int> songs;
std::copy(request.songs().begin(), request.songs().end(), songs.begin());
// Extract urls
QList<int> songs;
for (int i = 0; i<request.songs().size();i++) {
songs.append(request.songs(i));
}
// Insert the urls
emit RemoveSongs(request.playlist_id(), songs);
// Insert the urls
emit RemoveSongs(request.playlist_id(), songs);
}
void IncomingDataParser::ClientConnect(const pb::remote::Message& msg) {