Improvements to device manager
- Mount and unmount devices in lister thread - Safely close watcher and backends for devices - Enable abort loading device - Fix MTP connection
This commit is contained in:
@@ -68,7 +68,9 @@ class DeviceInfo : public SimpleTreeItem<DeviceInfo> {
|
||||
size_(0),
|
||||
transcode_mode_(MusicStorage::Transcode_Unsupported),
|
||||
transcode_format_(Song::FileType_Unknown),
|
||||
task_percentage_(-1) {}
|
||||
task_percentage_(-1),
|
||||
unmount_(false),
|
||||
forget_(false) {}
|
||||
|
||||
DeviceInfo(Type type, DeviceInfo *parent = nullptr)
|
||||
: SimpleTreeItem<DeviceInfo>(type, parent),
|
||||
@@ -76,7 +78,9 @@ class DeviceInfo : public SimpleTreeItem<DeviceInfo> {
|
||||
size_(0),
|
||||
transcode_mode_(MusicStorage::Transcode_Unsupported),
|
||||
transcode_format_(Song::FileType_Unknown),
|
||||
task_percentage_(-1) {}
|
||||
task_percentage_(-1),
|
||||
unmount_(false),
|
||||
forget_(false) {}
|
||||
|
||||
// A device can be discovered in different ways (udisks2, gio, etc.)
|
||||
// Sometimes the same device is discovered more than once. In this case the device will have multiple "backends".
|
||||
@@ -116,6 +120,9 @@ class DeviceInfo : public SimpleTreeItem<DeviceInfo> {
|
||||
|
||||
int task_percentage_;
|
||||
|
||||
bool unmount_;
|
||||
bool forget_;
|
||||
|
||||
};
|
||||
|
||||
#endif // DEVICEINFO_H
|
||||
|
||||
Reference in New Issue
Block a user