@@ -68,11 +68,16 @@ bool MtpLoader::TryLoad() {
|
||||
|
||||
connection_ = make_unique<MtpConnection>(url_);
|
||||
|
||||
if (!connection_ || !connection_->is_valid()) {
|
||||
if (!connection_) {
|
||||
emit Error(tr("Error connecting MTP device %1").arg(url_.toString()));
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!connection_->is_valid()) {
|
||||
emit Error(tr("Error connecting MTP device %1: %2").arg(url_.toString(), connection_->error_text()));
|
||||
return false;
|
||||
}
|
||||
|
||||
// Load the list of songs on the device
|
||||
SongList songs;
|
||||
LIBMTP_track_t *tracks = LIBMTP_Get_Tracklisting_With_Callback(connection_->device(), nullptr, nullptr);
|
||||
|
||||
Reference in New Issue
Block a user