mirror of
https://github.com/clementine-player/Clementine
synced 2025-01-29 02:29:56 +01:00
Slightly modify the way CddaLister::Init worksr: as cdio_get_devices sometimes return only symlinks, we should not ignore them.
This commit is contained in:
parent
40f0994da4
commit
fb07308607
@ -108,8 +108,9 @@ void CddaLister::Init() {
|
|||||||
for (; *devices != NULL; ++devices) {
|
for (; *devices != NULL; ++devices) {
|
||||||
QString device(*devices);
|
QString device(*devices);
|
||||||
QFileInfo device_info(device);
|
QFileInfo device_info(device);
|
||||||
if (device_info.isSymLink())
|
if (device_info.isSymLink()) {
|
||||||
continue;
|
device = device_info.symLinkTarget();
|
||||||
|
}
|
||||||
#ifdef Q_OS_DARWIN
|
#ifdef Q_OS_DARWIN
|
||||||
// Every track is detected as a separate device on Darwin. The raw disk looks
|
// Every track is detected as a separate device on Darwin. The raw disk looks
|
||||||
// like /dev/rdisk1
|
// like /dev/rdisk1
|
||||||
@ -117,8 +118,10 @@ void CddaLister::Init() {
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
if (!devices_list_.contains(device)) {
|
||||||
devices_list_ << device;
|
devices_list_ << device;
|
||||||
emit DeviceAdded(device);
|
emit DeviceAdded(device);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user