From 4bb433e9126acbc3f889d44bdd210cb38cf85050 Mon Sep 17 00:00:00 2001 From: Andreas Date: Tue, 7 May 2013 17:57:53 +0200 Subject: [PATCH] - Correct filename in coverexport when textfield is empty. - Network clients can now love and ban tracks. --- ext/libclementine-remote/remotecontrolmessages.proto | 3 +++ src/networkremote/incomingdataparser.cpp | 11 +++++++++++ src/networkremote/incomingdataparser.h | 2 ++ src/ui/albumcoverexport.cpp | 2 +- 4 files changed, 17 insertions(+), 1 deletion(-) diff --git a/ext/libclementine-remote/remotecontrolmessages.proto b/ext/libclementine-remote/remotecontrolmessages.proto index add2b85cb..af2ba65a4 100644 --- a/ext/libclementine-remote/remotecontrolmessages.proto +++ b/ext/libclementine-remote/remotecontrolmessages.proto @@ -14,6 +14,9 @@ enum MsgType { REMOVE_SONGS = 9; OPEN_PLAYLIST = 10; CLOSE_PLAYLIST = 11; + // Lastfm + LOVE = 12; + BAN = 13; // Messages send by both DISCONNECT = 2; diff --git a/src/networkremote/incomingdataparser.cpp b/src/networkremote/incomingdataparser.cpp index f41836431..189d9beca 100644 --- a/src/networkremote/incomingdataparser.cpp +++ b/src/networkremote/incomingdataparser.cpp @@ -21,6 +21,8 @@ #include "core/logging.h" #include "engines/enginebase.h" +#include "internet/internetmodel.h" +#include "internet/lastfmservice.h" #include "playlist/playlistmanager.h" #include "playlist/playlistsequence.h" #include "playlist/playlist.h" @@ -69,6 +71,11 @@ IncomingDataParser::IncomingDataParser(Application* app) app_->playlist_manager(), SLOT(Open(int))); connect(this, SIGNAL(Close(int)), app_->playlist_manager(), SLOT(Close(int))); + + connect(this, SIGNAL(Love()), + InternetModel::Service(), SLOT(Love())); + connect(this, SIGNAL(Ban()), + InternetModel::Service(), SLOT(Ban())); } IncomingDataParser::~IncomingDataParser() { @@ -126,6 +133,10 @@ void IncomingDataParser::Parse(const pb::remote::Message& msg) { case pb::remote::CLOSE_PLAYLIST: ClosePlaylist(msg); break; + case pb::remote::LOVE: emit Love(); + break; + case pb::remote::BAN: emit Ban(); + break; default: break; } } diff --git a/src/networkremote/incomingdataparser.h b/src/networkremote/incomingdataparser.h index f2124a7ad..73a1d6c4f 100644 --- a/src/networkremote/incomingdataparser.h +++ b/src/networkremote/incomingdataparser.h @@ -24,6 +24,8 @@ signals: void SendPlaylistSongs(int id); void Open(int id); void Close(int id); + void Love(); + void Ban(); void Play(); void PlayPause(); diff --git a/src/ui/albumcoverexport.cpp b/src/ui/albumcoverexport.cpp index 7f5fdfb8e..08f286283 100644 --- a/src/ui/albumcoverexport.cpp +++ b/src/ui/albumcoverexport.cpp @@ -58,7 +58,7 @@ AlbumCoverExport::DialogResult AlbumCoverExport::Exec() { if(!result.cancelled_) { QString fileName = ui_->fileName->text(); if (fileName.isEmpty()) { - fileName = "folder"; + fileName = "cover"; } OverwriteMode overwrite = ui_->doNotOverwrite->isChecked() ? OverwriteMode_None