is_new attribute added to the torrent state information
[qtrapids] / src / client / DownloadView.cpp
index d2201db..5aecc86 100644 (file)
@@ -49,8 +49,15 @@ namespace qtrapids
     {
         DownloadItems_t::iterator p = items_.find(info.hash);
         if (p != items_.end()) {
+            if (info.is_new) {
+                qWarning() << "item with similar info hash marked as new";
+            }
             updateItem_(p.value(), info, other_info);
         } else {
+            if (!info.is_new) {
+                qDebug() << "torrent info arrived but there is no torrent for it";
+                return;
+            }
             addItem_(info, other_info);
         }
     }