|
|
@ -798,17 +798,25 @@ void MainWindow::dropEvent(QDropEvent *event) { |
|
|
|
QBtSession::instance()->downloadFromUrl(file); |
|
|
|
QBtSession::instance()->downloadFromUrl(file); |
|
|
|
continue; |
|
|
|
continue; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
// Bitcomet or Magnet link
|
|
|
|
if(file.startsWith("bc://bt/", Qt::CaseInsensitive)) { |
|
|
|
if(file.startsWith("bc://bt/", Qt::CaseInsensitive)) { |
|
|
|
qDebug("Converting bc link to magnet link"); |
|
|
|
qDebug("Converting bc link to magnet link"); |
|
|
|
file = misc::bcLinkToMagnet(file); |
|
|
|
file = misc::bcLinkToMagnet(file); |
|
|
|
} |
|
|
|
} |
|
|
|
if(file.startsWith("magnet:", Qt::CaseInsensitive)) { |
|
|
|
if(file.startsWith("magnet:", Qt::CaseInsensitive)) { |
|
|
|
// FIXME: Possibly skipped torrent addition dialog
|
|
|
|
if(useTorrentAdditionDialog) { |
|
|
|
|
|
|
|
torrentAdditionDialog *dialog = new torrentAdditionDialog(this); |
|
|
|
|
|
|
|
dialog->showLoadMagnetURI(file); |
|
|
|
|
|
|
|
} else { |
|
|
|
QBtSession::instance()->addMagnetUri(file); |
|
|
|
QBtSession::instance()->addMagnetUri(file); |
|
|
|
|
|
|
|
} |
|
|
|
continue; |
|
|
|
continue; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
// Local file
|
|
|
|
if(useTorrentAdditionDialog) { |
|
|
|
if(useTorrentAdditionDialog) { |
|
|
|
torrentAdditionDialog *dialog = new torrentAdditionDialog(this); |
|
|
|
torrentAdditionDialog *dialog = new torrentAdditionDialog(this); |
|
|
|
|
|
|
|
if(file.startsWith("file:", Qt::CaseInsensitive)) |
|
|
|
|
|
|
|
file = QUrl(file).toLocalFile(); |
|
|
|
dialog->showLoad(file); |
|
|
|
dialog->showLoad(file); |
|
|
|
}else{ |
|
|
|
}else{ |
|
|
|
QBtSession::instance()->addTorrent(file); |
|
|
|
QBtSession::instance()->addTorrent(file); |
|
|
|