Compare commits
11 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
67cba29a8f
|
|||
| 2e5fc75fee | |||
|
|
f58c6c3880 | ||
|
|
2b52a367f2 | ||
| 36e6801f29 | |||
| 2cd7d69aa5 | |||
| 1aaaab10dc | |||
| e04415db9b | |||
| 911beb25bc | |||
| 0a6ac353ff | |||
| f89ea7eab6 |
44
.github/ISSUE_TEMPLATE/bug_report.md
vendored
44
.github/ISSUE_TEMPLATE/bug_report.md
vendored
@@ -1,31 +1,35 @@
|
|||||||
---
|
---
|
||||||
name: Bug report
|
name: "[请按照此模板填写] 报告 Bug"
|
||||||
about: Create a bug report to help us improve
|
about: "创建一个 Bug 报告,不按照模板的 Issue 会被关闭。"
|
||||||
title: "[Bug] Summarize the bug here"
|
title: "[Bug] 总结你的 Bug 报告"
|
||||||
labels: bug
|
labels: bug
|
||||||
assignees: taurusxin
|
assignees: taurusxin
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
**Describe the bug**
|
**Bug 描述**
|
||||||
A clear and concise description of what the bug is.
|
清晰地描述一下 Bug 的大致问题。
|
||||||
|
|
||||||
**To Reproduce**
|
**复现方法**
|
||||||
Steps to reproduce the behavior:
|
|
||||||
1. Go to '...'
|
|
||||||
2. Click on '....'
|
|
||||||
3. Scroll down to '....'
|
|
||||||
4. See error
|
|
||||||
|
|
||||||
**Expected behavior**
|
复现此 Bug 的方法
|
||||||
A clear and concise description of what you expected to happen.
|
|
||||||
|
|
||||||
**Screenshots**
|
1. 打开 '...'
|
||||||
If applicable, add screenshots to help explain your problem.
|
2. 点击 '....'
|
||||||
|
3. 发生报错
|
||||||
|
|
||||||
**Desktop (please complete the following information):**
|
**预期行为**
|
||||||
- OS: [e.g. Windows 11]
|
|
||||||
|
|
||||||
|
解释一下原本应该出现的结果。
|
||||||
|
|
||||||
**Additional context**
|
**屏幕截图**
|
||||||
Add any other context about the problem here.
|
|
||||||
|
如果可以,屏幕截图可以更好地阐述你的问题。
|
||||||
|
|
||||||
|
**环境**
|
||||||
|
|
||||||
|
- OS: [e.g. Windows 11]
|
||||||
|
- 软件版本: [e.g. 1.3.2]
|
||||||
|
|
||||||
|
**附加内容**
|
||||||
|
|
||||||
|
添加更多其他内容以帮助开发者更好地了解这个 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.Dump();
|
||||||
crypt.FixMetadata();
|
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)
|
catch (const std::invalid_argument &e)
|
||||||
{
|
{
|
||||||
@@ -91,7 +91,7 @@ int main(int argc, char **argv)
|
|||||||
if (i + 1 < argc && argv[i + 1][0] != '-')
|
if (i + 1 < argc && argv[i + 1][0] != '-')
|
||||||
{
|
{
|
||||||
folderProvided = true;
|
folderProvided = true;
|
||||||
processFilesInFolder(argv[i + 1]);
|
processFilesInFolder(fs::u8path(argv[i + 1]));
|
||||||
// Skip the folder name
|
// Skip the folder name
|
||||||
++i;
|
++i;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,6 +2,7 @@
|
|||||||
#include "aes.h"
|
#include "aes.h"
|
||||||
#include "base64.h"
|
#include "base64.h"
|
||||||
#include "cJSON.h"
|
#include "cJSON.h"
|
||||||
|
#include "color.h"
|
||||||
|
|
||||||
#define TAGLIB_STATIC
|
#define TAGLIB_STATIC
|
||||||
#include "taglib/toolkit/tfile.h"
|
#include "taglib/toolkit/tfile.h"
|
||||||
@@ -358,7 +359,7 @@ NeteaseCrypt::NeteaseCrypt(std::string const &path)
|
|||||||
|
|
||||||
if (n <= 0)
|
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;
|
mMetaData = NULL;
|
||||||
}
|
}
|
||||||
@@ -391,23 +392,24 @@ NeteaseCrypt::NeteaseCrypt(std::string const &path)
|
|||||||
mMetaData = new NeteaseMusicMetadata(cJSON_Parse(modifyDecryptData.c_str()));
|
mMetaData = new NeteaseMusicMetadata(cJSON_Parse(modifyDecryptData.c_str()));
|
||||||
}
|
}
|
||||||
|
|
||||||
// skip crc32 & unuse charset
|
// skip crc32 & image version
|
||||||
if (!mFile.seekg(9, mFile.cur))
|
if (!mFile.seekg(5, mFile.cur))
|
||||||
{
|
{
|
||||||
throw std::invalid_argument("can't seek file");
|
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));
|
read(reinterpret_cast<char *>(&n), sizeof(n));
|
||||||
|
|
||||||
if (n > 0)
|
if (n > 0)
|
||||||
{
|
{
|
||||||
char *imageData = (char *)malloc(n);
|
mImageData = std::string(n, '\0');
|
||||||
read(imageData, n);
|
read(&mImageData[0], n);
|
||||||
|
|
||||||
mImageData = std::string(imageData, n);
|
|
||||||
}
|
}
|
||||||
else
|
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