From 67cba29a8f09f49c174f2b76143c11d2b1808d82 Mon Sep 17 00:00:00 2001 From: TaurusXin Date: Fri, 13 Sep 2024 10:58:29 +0800 Subject: [PATCH] chore: enhance output --- src/main.cpp | 2 +- src/ncmcrypt.cpp | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/main.cpp b/src/main.cpp index 9c640b3..5909bd3 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -35,7 +35,7 @@ void processFile(const fs::path &filePath) crypt.Dump(); crypt.FixMetadata(); - std::cout << BOLDGREEN << "Done: " << RESET << "'" << crypt.dumpFilepath().u8string() << "'" << std::endl; + std::cout << BOLDGREEN << "[Done] " << RESET << "'" << filePath.u8string() << "' -> '" << crypt.dumpFilepath().u8string() << "'" << std::endl; } catch (const std::invalid_argument &e) { diff --git a/src/ncmcrypt.cpp b/src/ncmcrypt.cpp index d36fd1d..09f7dbc 100644 --- a/src/ncmcrypt.cpp +++ b/src/ncmcrypt.cpp @@ -2,6 +2,7 @@ #include "aes.h" #include "base64.h" #include "cJSON.h" +#include "color.h" #define TAGLIB_STATIC #include "taglib/toolkit/tfile.h" @@ -358,7 +359,7 @@ NeteaseCrypt::NeteaseCrypt(std::string const &path) if (n <= 0) { - std::cout << "[Warn] " << path << " missing metadata infomation can't fix some infomation!" << std::endl; + std::cout << BOLDYELLOW << "[Warn] " << RESET << "'" << path << "' missing metadata infomation can't fix some infomation!" << std::endl; mMetaData = NULL; } @@ -408,7 +409,7 @@ NeteaseCrypt::NeteaseCrypt(std::string const &path) } else { - std::cout << "[Warn] " << path << " missing album can't fix album image!" << std::endl; + std::cout << BOLDYELLOW << "[Warn] " << RESET << "'" << path << "' missing album can't fix album image!" << std::endl; } mFile.seekg(cover_frame_len - n, mFile.cur); }