Cancel transcode when downloader disconnects.

This commit is contained in:
Andreas 2014-11-18 11:55:27 +01:00
parent 8ac5d8e595
commit 5e77aed01e
2 changed files with 8 additions and 0 deletions

View File

@ -56,6 +56,13 @@ SongSender::SongSender(Application* app, RemoteClient* client)
total_transcode_ = 0;
}
SongSender::~SongSender() {
disconnect(transcoder_, SIGNAL(JobComplete(QString, QString, bool)), this,
SLOT(TranscodeJobComplete(QString, QString, bool)));
disconnect(transcoder_, SIGNAL(AllJobsComplete()), this, SLOT(StartTransfer()));
transcoder_->Cancel();
}
void SongSender::SendSongs(const pb::remote::RequestDownloadSongs& request) {
Song current_song = app_->player()->GetCurrentItem()->Metadata();
switch (request.download_item()) {

View File

@ -26,6 +26,7 @@ class SongSender : public QObject {
Q_OBJECT
public:
SongSender(Application* app, RemoteClient* client);
~SongSender();
static const quint32 kFileChunkSize;