Remove AudioCD tracks from playqueue when device removed
This commit is contained in:
@@ -149,7 +149,7 @@ AudioCdDevice::~AudioCdDevice()
|
||||
}
|
||||
|
||||
if (!tracks.isEmpty()) {
|
||||
emit invalid(tracks);
|
||||
PlayQueueModel::self()->remove(tracks);
|
||||
}
|
||||
|
||||
#ifdef CDDB_FOUND
|
||||
|
||||
@@ -192,7 +192,6 @@ Q_SIGNALS:
|
||||
void cover(const Song &song, const QImage &img);
|
||||
void cacheSaved();
|
||||
void configurationChanged();
|
||||
void invalid(const QList<Song> &songs);
|
||||
void play(const QList<Song> &songs);
|
||||
void updatedDetails(const QList<Song> &songs);
|
||||
void renamed();
|
||||
|
||||
@@ -455,7 +455,6 @@ void DevicesModel::addLocalDevice(const QString &udi)
|
||||
connect(dev, SIGNAL(updating(const QString &, bool)), SLOT(deviceUpdating(const QString &, bool)));
|
||||
connect(dev, SIGNAL(error(const QString &)), SIGNAL(error(const QString &)));
|
||||
connect(dev, SIGNAL(cover(const Song &, const QImage &)), SLOT(setCover(const Song &, const QImage &)));
|
||||
connect(dev, SIGNAL(invalid(QList<Song>)), SIGNAL(invalid(QList<Song>)));
|
||||
connect(dev, SIGNAL(updatedDetails(QList<Song>)), SIGNAL(updatedDetails(QList<Song>)));
|
||||
connect(dev, SIGNAL(play(QList<Song>)), SLOT(play(QList<Song>)));
|
||||
connect(dev, SIGNAL(renamed()), this, SLOT(updateItemMenu()));
|
||||
|
||||
@@ -227,7 +227,6 @@ PlayQueueModel::PlayQueueModel(QObject *parent)
|
||||
connect(MPDConnection::self(), SIGNAL(rating(QString,quint8)), SLOT(ratingResult(QString,quint8)));
|
||||
connect(MPDConnection::self(), SIGNAL(stickerDbChanged()), SLOT(stickerDbChanged()));
|
||||
#ifdef ENABLE_DEVICES_SUPPORT //TODO: Problems here with devices support!!!
|
||||
connect(DevicesModel::self(), SIGNAL(invalid(QList<Song>)), SLOT(remove(QList<Song>)));
|
||||
connect(DevicesModel::self(), SIGNAL(updatedDetails(QList<Song>)), SLOT(updateDetails(QList<Song>)));
|
||||
#endif
|
||||
#if defined ENABLE_MODEL_TEST
|
||||
|
||||
@@ -140,6 +140,7 @@ public:
|
||||
void enableUndo(bool e);
|
||||
bool lastCommandWasUnodOrRedo() const { return Cmd_Other!=lastCommand; }
|
||||
qint32 totalTime() const { return time; }
|
||||
void remove(const QList<Song> &rem);
|
||||
|
||||
private:
|
||||
void saveHistory(const QList<Song> &prevList);
|
||||
@@ -160,7 +161,6 @@ public Q_SLOTS:
|
||||
private Q_SLOTS:
|
||||
void sortBy();
|
||||
void stopAfterCurrentChanged(bool afterCurrent);
|
||||
void remove(const QList<Song> &rem);
|
||||
void updateDetails(const QList<Song> &updated);
|
||||
void undo();
|
||||
void redo();
|
||||
|
||||
Reference in New Issue
Block a user