Upload manager changes
This commit is contained in:
@@ -213,7 +213,7 @@ void CUploadManager::AutoThreadCallback(const CSiaCurl& siaCurl, CSiaDriveConfig
|
|||||||
else if (uploadStatus == UploadStatus::Modified)
|
else if (uploadStatus == UploadStatus::Modified)
|
||||||
{
|
{
|
||||||
// TODO Delete from Sia first
|
// TODO Delete from Sia first
|
||||||
SET_STATUS(UploadStatus::Modified, UploadModifiedInQueue, ModifyUploadStatusFailed)
|
SET_STATUS(UploadStatus::Queued, ModifiedUploadQueued, ModifyUploadStatusFailed)
|
||||||
}
|
}
|
||||||
else if ((*it)->GetUploadProgress() >= 100)
|
else if ((*it)->GetUploadProgress() >= 100)
|
||||||
{
|
{
|
||||||
@@ -335,7 +335,7 @@ UploadError CUploadManager::AddOrUpdate(const String& siaPath, String filePath)
|
|||||||
CEventSystem::EventSystem.NotifyEvent(CreateSystemEvent(ExistingUploadFound(siaPath, filePath, uploadStatus)));
|
CEventSystem::EventSystem.NotifyEvent(CreateSystemEvent(ExistingUploadFound(siaPath, filePath, uploadStatus)));
|
||||||
if (uploadStatus == UploadStatus::Uploading)
|
if (uploadStatus == UploadStatus::Uploading)
|
||||||
{
|
{
|
||||||
// set to modified
|
SET_STATUS(UploadStatus::Modified, UploadModifiedInQueue, ModifyUploadStatusFailed)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@@ -141,6 +141,38 @@ public:
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
class ModifiedUploadQueued :
|
||||||
|
public CEvent
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
ModifiedUploadQueued(const String& siaPath, const String& filePath) :
|
||||||
|
_siaPath(siaPath),
|
||||||
|
_filePath(filePath)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public:
|
||||||
|
virtual ~ModifiedUploadQueued()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
private:
|
||||||
|
const String _siaPath;
|
||||||
|
const String _filePath;
|
||||||
|
|
||||||
|
public:
|
||||||
|
virtual String GetSingleLineMessage() const override
|
||||||
|
{
|
||||||
|
return L"ModifiedUploadQueued|SP|" + _siaPath + L"|FP|" + _filePath;
|
||||||
|
}
|
||||||
|
|
||||||
|
virtual std::shared_ptr<CEvent> Clone() const override
|
||||||
|
{
|
||||||
|
return std::shared_ptr<CEvent>(new ModifiedUploadQueued(_siaPath, _filePath));
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
class UploadComplete :
|
class UploadComplete :
|
||||||
public CEvent
|
public CEvent
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user