diff --git a/src/components/FilePathBlock.tsx b/src/components/FilePathBlock.tsx
new file mode 100644
index 0000000..83339c2
--- /dev/null
+++ b/src/components/FilePathBlock.tsx
@@ -0,0 +1,10 @@
+import { Code, Text } from '@chakra-ui/react';
+import React from 'react';
+
+export function FilePathBlock({ children }: { children: React.ReactNode }) {
+ return (
+
+ {children}
+
+ );
+}
diff --git a/src/features/settings/panels/QMCv2/ImportFileModal.tsx b/src/features/settings/panels/QMCv2/ImportFileModal.tsx
index 811311b..0f9a84a 100644
--- a/src/features/settings/panels/QMCv2/ImportFileModal.tsx
+++ b/src/features/settings/panels/QMCv2/ImportFileModal.tsx
@@ -12,6 +12,7 @@ import {
TabPanel,
TabPanels,
Tabs,
+ Text,
useToast,
} from '@chakra-ui/react';
@@ -24,6 +25,8 @@ import { InstructionsAndroid } from './InstructionsAndroid';
import { MMKVParser } from '~/util/MMKVParser';
import { getFileName } from '~/util/pathHelper';
import { InstructionsMac } from './InstructionsMac';
+import { InstructionsIOS } from './InstructionsIOS';
+import { InstructionsPC } from './InstructionsPC';
export interface ImportFileModalProps {
show: boolean;
@@ -88,18 +91,28 @@ export function ImportFileModal({ onClose, show }: ImportFileModalProps) {
拖放或点我选择含有密钥的数据库文件
-
+ 选择你的「QQ 音乐」客户端平台以查看对应说明:
+
+
- 安卓客户端
- Mac 客户端
+ 安卓
+ iOS
+ Mac
+ Windows
+
+
+
+
+
+
diff --git a/src/features/settings/panels/QMCv2/InstructionsIOS.tsx b/src/features/settings/panels/QMCv2/InstructionsIOS.tsx
new file mode 100644
index 0000000..9bb4662
--- /dev/null
+++ b/src/features/settings/panels/QMCv2/InstructionsIOS.tsx
@@ -0,0 +1,101 @@
+import { Box, Code, Heading, ListItem, OrderedList, Text, UnorderedList } from '@chakra-ui/react';
+import { FilePathBlock } from '~/components/FilePathBlock';
+
+const EXAMPLE_MEDIA_ID = '0011wjLv1bIkvv';
+const EXAMPLE_NAME_IOS = '333407709-0011wjLv1bIkvv-1.mgalaxy';
+const EXAMPLE_NAME_DB = 'Q0M00011wjLv1bIkvv.mflac';
+
+export function InstructionsIOS() {
+ return (
+ <>
+ 不推荐从该平台客户端提取文件,因为使用者需要对 iOS 设备进行完整备份。
+
+ 未越狱用户指南
+
+ 未越狱用户需要对设备进行完整备份,并能提取备份内的文件。
+
+
+ 使用你喜欢的备份软件对 iOS 设备进行完整备份;
+
+
+ 打开备份文件,并导航到下述目录:
+ /AppDomain-com.tencent.QQMusic/Documents/mmkv/
+
+
+
+ 提取或导出密钥数据库文件 filenameEkeyMap
;
+
+
+
+
+ 提交导出的 filenameEkeyMap
文件;
+
+
+
+ 按下「保存」来应用更改。
+
+
+
+ 获取离线文件
+
+
+ 通过客户端下载的音乐文件存储在备份的下述目录:
+ /AppDomain-com.tencent.QQMusic/Library/Application Support/com.tencent.QQMusic/iData/iMusic
+
+ 该目录又存在数个子目录,其子目录下保存的「*.mgalaxy
」文件则是最终的加密文件。
+
+
+ 格式:[随机数字]-[id]-[随机数字].mgalaxy
+
+
+ 例:{EXAMPLE_NAME_IOS}
+
+
+
+ 解密离线文件
+
+
+
+
+ 在上方的样例文件的情况下,得知其 id 为 {EXAMPLE_MEDIA_ID}
;
+
+
+
+
+ 查找密钥表,得到文件名「{EXAMPLE_NAME_DB}
」;
+
+
+
+
+ 将导出的「{EXAMPLE_NAME_IOS}
」更名为数据库存储的文件名「
+ {EXAMPLE_NAME_DB}
」;
+
+
+
+
+ 回到主界面,提交离线文件「{EXAMPLE_NAME_DB}
」。
+
+
+
+
+ 越狱用户参考
+
+ 该节信息根据网络上公开的信息整理,仅供参考。
+
+
+ 密钥数据库文件路径:
+
+ /var/mobile/Containers/Data/Application/<随机>/Documents/mmkv/filenameEkeyMap
+
+
+
+ 离线音乐文件下载目录:
+
+ /var/mobile/Containers/Data/Application/<随机>/Library/Application
+ Support/com.tencent.QQMusic/iData/iMusic
+
+
+
+ >
+ );
+}
diff --git a/src/features/settings/panels/QMCv2/InstructionsMac.tsx b/src/features/settings/panels/QMCv2/InstructionsMac.tsx
index 9e18293..44c2526 100644
--- a/src/features/settings/panels/QMCv2/InstructionsMac.tsx
+++ b/src/features/settings/panels/QMCv2/InstructionsMac.tsx
@@ -1,4 +1,5 @@
import { Heading, Text, Code, Kbd, OrderedList, ListItem } from '@chakra-ui/react';
+import { FilePathBlock } from '~/components/FilePathBlock';
import { MacCommandKey } from '~/components/Key/MacCommandKey';
import { ShiftKey } from '~/components/Key/ShiftKey';
@@ -7,12 +8,9 @@ export function InstructionsMac() {
<>
Mac 客户端使用 mmkv 数据库储存密钥。
该密钥文件通常存储在下述路径:
-
-
- ~/Library/Containers/com.tencent.QQMusicMac/Data/Library/Application
- Support/QQMusicMac/mmkv/MMKVStreamEncryptId
-
-
+
+ ~/Library/Containers/com.tencent.QQMusicMac/Data/Library/Application Support/QQMusicMac/mmkv/MMKVStreamEncryptId
+
导入密钥
diff --git a/src/features/settings/panels/QMCv2/InstructionsPC.tsx b/src/features/settings/panels/QMCv2/InstructionsPC.tsx
new file mode 100644
index 0000000..86d0a07
--- /dev/null
+++ b/src/features/settings/panels/QMCv2/InstructionsPC.tsx
@@ -0,0 +1,9 @@
+import { Text } from '@chakra-ui/react';
+
+export function InstructionsPC() {
+ return (
+ <>
+ 使用 Windows 客户端下载的文件不需要导入密钥。
+ >
+ );
+}