Compare commits
11 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
67cba29a8f
|
|||
| 2e5fc75fee | |||
|
|
f58c6c3880 | ||
|
|
2b52a367f2 | ||
| 36e6801f29 | |||
| 2cd7d69aa5 | |||
| 1aaaab10dc | |||
| e04415db9b | |||
| 911beb25bc | |||
| 0a6ac353ff | |||
| f89ea7eab6 |
42
.github/ISSUE_TEMPLATE/bug_report.md
vendored
42
.github/ISSUE_TEMPLATE/bug_report.md
vendored
@@ -1,31 +1,35 @@
|
||||
---
|
||||
name: Bug report
|
||||
about: Create a bug report to help us improve
|
||||
title: "[Bug] Summarize the bug here"
|
||||
name: "[请按照此模板填写] 报告 Bug"
|
||||
about: "创建一个 Bug 报告,不按照模板的 Issue 会被关闭。"
|
||||
title: "[Bug] 总结你的 Bug 报告"
|
||||
labels: bug
|
||||
assignees: taurusxin
|
||||
|
||||
---
|
||||
|
||||
**Describe the bug**
|
||||
A clear and concise description of what the bug is.
|
||||
**Bug 描述**
|
||||
清晰地描述一下 Bug 的大致问题。
|
||||
|
||||
**To Reproduce**
|
||||
Steps to reproduce the behavior:
|
||||
1. Go to '...'
|
||||
2. Click on '....'
|
||||
3. Scroll down to '....'
|
||||
4. See error
|
||||
**复现方法**
|
||||
|
||||
**Expected behavior**
|
||||
A clear and concise description of what you expected to happen.
|
||||
复现此 Bug 的方法
|
||||
|
||||
**Screenshots**
|
||||
If applicable, add screenshots to help explain your problem.
|
||||
1. 打开 '...'
|
||||
2. 点击 '....'
|
||||
3. 发生报错
|
||||
|
||||
**预期行为**
|
||||
|
||||
解释一下原本应该出现的结果。
|
||||
|
||||
**屏幕截图**
|
||||
|
||||
如果可以,屏幕截图可以更好地阐述你的问题。
|
||||
|
||||
**环境**
|
||||
|
||||
**Desktop (please complete the following information):**
|
||||
- OS: [e.g. Windows 11]
|
||||
- 软件版本: [e.g. 1.3.2]
|
||||
|
||||
**附加内容**
|
||||
|
||||
**Additional context**
|
||||
Add any other context about the problem here.
|
||||
添加更多其他内容以帮助开发者更好地了解这个 Bug。
|
||||
|
||||
20
.github/ISSUE_TEMPLATE/feature_request.md
vendored
20
.github/ISSUE_TEMPLATE/feature_request.md
vendored
@@ -1,20 +0,0 @@
|
||||
---
|
||||
name: Feature request
|
||||
about: Suggest an idea for this project
|
||||
title: "[Feature] Summarize new feature here"
|
||||
labels: ''
|
||||
assignees: ''
|
||||
|
||||
---
|
||||
|
||||
**Is your feature request related to a problem? Please describe.**
|
||||
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
|
||||
|
||||
**Describe the solution you'd like**
|
||||
A clear and concise description of what you want to happen.
|
||||
|
||||
**Describe alternatives you've considered**
|
||||
A clear and concise description of any alternative solutions or features you've considered.
|
||||
|
||||
**Additional context**
|
||||
Add any other context or screenshots about the feature request here.
|
||||
@@ -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)
|
||||
{
|
||||
@@ -91,7 +91,7 @@ int main(int argc, char **argv)
|
||||
if (i + 1 < argc && argv[i + 1][0] != '-')
|
||||
{
|
||||
folderProvided = true;
|
||||
processFilesInFolder(argv[i + 1]);
|
||||
processFilesInFolder(fs::u8path(argv[i + 1]));
|
||||
// Skip the folder name
|
||||
++i;
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
@@ -391,23 +392,24 @@ NeteaseCrypt::NeteaseCrypt(std::string const &path)
|
||||
mMetaData = new NeteaseMusicMetadata(cJSON_Parse(modifyDecryptData.c_str()));
|
||||
}
|
||||
|
||||
// skip crc32 & unuse charset
|
||||
if (!mFile.seekg(9, mFile.cur))
|
||||
// skip crc32 & image version
|
||||
if (!mFile.seekg(5, mFile.cur))
|
||||
{
|
||||
throw std::invalid_argument("can't seek file");
|
||||
}
|
||||
|
||||
uint32_t cover_frame_len{0};
|
||||
read(reinterpret_cast<char *>(&cover_frame_len), 4);
|
||||
read(reinterpret_cast<char *>(&n), sizeof(n));
|
||||
|
||||
if (n > 0)
|
||||
{
|
||||
char *imageData = (char *)malloc(n);
|
||||
read(imageData, n);
|
||||
|
||||
mImageData = std::string(imageData, n);
|
||||
mImageData = std::string(n, '\0');
|
||||
read(&mImageData[0], n);
|
||||
}
|
||||
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);
|
||||
}
|
||||
|
||||
BIN
test/expect.bin
BIN
test/expect.bin
Binary file not shown.
Reference in New Issue
Block a user