Cancel transcode when downloader disconnects.
This commit is contained in:
parent
8ac5d8e595
commit
5e77aed01e
@ -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()) {
|
||||
|
@ -26,6 +26,7 @@ class SongSender : public QObject {
|
||||
Q_OBJECT
|
||||
public:
|
||||
SongSender(Application* app, RemoteClient* client);
|
||||
~SongSender();
|
||||
|
||||
static const quint32 kFileChunkSize;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user