Removing watch_for_disc_changes in CddaDevice constructor

This commit is contained in:
Lukas Prediger 2021-06-11 17:13:36 +03:00 committed by John Maguire
parent 83b6bf28f3
commit 6fa9cbcc65
2 changed files with 3 additions and 5 deletions

View File

@ -26,8 +26,7 @@ const int CddaDevice::kDiscChangePollingIntervalMs = 500;
CddaDevice::CddaDevice(const QUrl& url, DeviceLister* lister,
const QString& unique_id, DeviceManager* manager,
Application* app, int database_id, bool first_time,
bool watch_for_disc_changes)
Application* app, int database_id, bool first_time)
: ConnectedDevice(url, lister, unique_id, manager, app, database_id,
first_time),
cdio_(nullptr),
@ -42,7 +41,6 @@ CddaDevice::CddaDevice(const QUrl& url, DeviceLister* lister,
connect(this, SIGNAL(SongsDiscovered(SongList)), model_,
SLOT(SongsDiscovered(SongList)));
connect(&disc_changed_timer_, SIGNAL(timeout()), SLOT(CheckDiscChanged()));
WatchForDiscChanges(watch_for_disc_changes);
}
CddaDevice::~CddaDevice() {
@ -57,6 +55,7 @@ bool CddaDevice::Init() {
cdio_ = cdio_open(url_.path().toLocal8Bit().constData(), DRIVER_DEVICE);
if (!cdio_) return false;
LoadSongs();
WatchForDiscChanges(true);
}
return true;
}

View File

@ -40,8 +40,7 @@ class CddaDevice : public ConnectedDevice {
// a valid device handle is undefined behavior and might result in crashes.
Q_INVOKABLE CddaDevice(const QUrl& url, DeviceLister* lister,
const QString& unique_id, DeviceManager* manager,
Application* app, int database_id, bool first_time,
bool watch_for_disc_changes = true);
Application* app, int database_id, bool first_time);
~CddaDevice();
bool Init() override;