menu->showMessage("File already Marked");
return;
}
+ menu->showMessage("Hashing file");
+
connect(addCommand, SIGNAL(hashComplete()), this, SLOT(doMarkWatched()));
addCommand->setMarkWatched(true);
qDebug() << "hashing file...";
if (!cmd)
return;
- connect(cmd, SIGNAL(replyReady()), cmd, SLOT(deleteLater()));
+ connect(cmd, SIGNAL(replyReady(bool)), this, SLOT(showMarkResult(bool)));
anidb->send(cmd);
+ menu->showMessage(tr("Marking file %1").arg(cmd->file()));
+}
+
+void VideoWindow::showMarkResult(bool success)
+{
+ MylistAddCommand *cmd = qobject_cast<MylistAddCommand *>(sender());
+ if (!cmd)
+ return;
+ if (success)
+ {
+ menu->showMessage(tr("File %1 marked watched").arg(cmd->file()));
+ }
+ else
+ {
+ menu->showMessage(tr("Failed to mark file %1").arg(cmd->file()));
+ }
+ cmd->deleteLater();
}
void VideoWindow::anidbSettings()