Skip to content

Commit 5546cc1

Browse files
committed
🐛 修复数据导入tm问题 #187
1 parent c453d21 commit 5546cc1

File tree

3 files changed

+4
-6
lines changed

3 files changed

+4
-6
lines changed

src/app/service/synchronize/manager.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -414,8 +414,7 @@ export default class SynchronizeManager extends Manager {
414414
},
415415
meta: {
416416
name: script.name,
417-
// NOTE: tm会对同名的uuid校验,先屏蔽了
418-
// uuid: script.uuid,
417+
uuid: script.uuid,
419418
sc_uuid: script.uuid,
420419
modified: script.updatetime,
421420
file_url: script.downloadUrl,

src/pages/import/App.tsx

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -66,9 +66,7 @@ function App() {
6666
item.script = await prepareScriptByCode(
6767
item.code,
6868
item.options?.meta.file_url || "",
69-
item.options?.meta.sc_uuid ||
70-
item.options?.meta.uuid ||
71-
undefined
69+
item.options?.meta.sc_uuid || undefined
7270
);
7371
} catch (e: any) {
7472
item.error = e.toString();
@@ -79,6 +77,7 @@ function App() {
7977
options: {} as ScriptOptions,
8078
meta: {
8179
name: item.script.name,
80+
// 此uuid是对tm的兼容处理
8281
uuid: item.script.uuid,
8382
sc_uuid: item.script.uuid,
8483
file_url: item.script.downloadUrl || "",

src/pkg/backup/struct.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ export type ScriptOptions = {
5151

5252
export type ScriptMeta = {
5353
name: string;
54-
uuid?: string; // tm会对同名的uuid校验,先屏蔽了
54+
uuid: string; // 此uuid是对tm的兼容处理
5555
sc_uuid: string; // 脚本猫uuid
5656
modified: number;
5757
file_url: string;

0 commit comments

Comments
 (0)