Skip to content

Commit

Permalink
Simplify the definition.
Browse files Browse the repository at this point in the history
  • Loading branch information
MouriNaruto committed Jul 10, 2024
1 parent 35e128c commit f3f6e51
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
4 changes: 2 additions & 2 deletions NanaGet/NanaGetCore.h
Original file line number Diff line number Diff line change
Expand Up @@ -74,14 +74,14 @@ namespace NanaGet
struct Aria2TaskInformation
{
std::string Gid;
NanaGet::Aria2::DownloadStatus Status;
Aria2::DownloadStatus Status;
std::uint64_t TotalLength;
std::uint64_t CompletedLength;
std::uint64_t DownloadSpeed;
std::uint64_t UploadSpeed;
std::string InfoHash;
std::string Dir;
std::vector<NanaGet::Aria2::FileInformation> Files;
std::vector<Aria2::FileInformation> Files;
std::string FriendlyName;
};

Expand Down
16 changes: 8 additions & 8 deletions NanaGet/TaskItem.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,9 @@ namespace winrt::NanaGet::implementation
hstring Result;

std::set<hstring> Uris;
for (NanaGet::Aria2::FileInformation const& File : Information.Files)
for (Aria2::FileInformation const& File : Information.Files)
{
for (NanaGet::Aria2::UriInformation const& Item : File.Uris)
for (Aria2::UriInformation const& Item : File.Uris)
{
Uris.emplace(winrt::to_hstring(Item.Uri));
}
Expand All @@ -62,22 +62,22 @@ namespace winrt::NanaGet::implementation

switch (Information.Status)
{
case NanaGet::Aria2::DownloadStatus::Active:
case Aria2::DownloadStatus::Active:
this->Status.Value = TaskStatus::Active;
break;
case NanaGet::Aria2::DownloadStatus::Waiting:
case Aria2::DownloadStatus::Waiting:
this->Status.Value = TaskStatus::Waiting;
break;
case NanaGet::Aria2::DownloadStatus::Paused:
case Aria2::DownloadStatus::Paused:
this->Status.Value = TaskStatus::Paused;
break;
case NanaGet::Aria2::DownloadStatus::Error:
case Aria2::DownloadStatus::Error:
this->Status.Value = TaskStatus::Error;
break;
case NanaGet::Aria2::DownloadStatus::Complete:
case Aria2::DownloadStatus::Complete:
this->Status.Value = TaskStatus::Complete;
break;
case NanaGet::Aria2::DownloadStatus::Removed:
case Aria2::DownloadStatus::Removed:
this->Status.Value = TaskStatus::Removed;
break;
default:
Expand Down

0 comments on commit f3f6e51

Please sign in to comment.