Skip to content

Commit

Permalink
fix default && magrite data framework
Browse files Browse the repository at this point in the history
  • Loading branch information
Hiram committed Apr 21, 2024
1 parent 79471db commit 6a49671
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 16 deletions.
22 changes: 18 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,21 @@
"defaultIptv": "993841fe-5e91-5e5d-35d6-5be81822960b", // iptv 默认源标识
"defaultAnalyze": "fddfb425-6fd9-0b39-459f-a21f69739a6e", // analyze 默认源标识
"defaultDrive": "3293dc45-cf14-9c66-3028-5b7765b240b7", // drive 默认源标识
"defaultViewCasual": "", // [3.3.4版本启用]随性看地址
"defaultViewCasual": "", // [3.3.4版本启用]心性看地址
"barrage": {
"url": "", // 弹幕地址
"key": "danmuku", // 弹幕接口返回数据对应的key
"support": [
"qq",
"qiyi",
"youku",
"mgtv"
], // 弹幕支持的线路
"start": "0", // 弹幕接口返回数据对应的开始时间的位置
"mode": "1", // 弹幕接口返回数据对应的位置的位置
"color": "2", // 弹幕接口返回数据对应的颜色的位置
"content": "4" // 弹幕接口返回数据对应的内容的位置
}, // [3.3.4版本启用]弹幕参数
"analyzeFlag": [
"youku",
"qq",
Expand Down Expand Up @@ -177,9 +191,9 @@
"webdev": {
"sync": false, // 自动同步
"data": {
"url": "https://dav.jianguoyun.com/dav/",
"user": "",
"password": ""
"url": "https://dav.jianguoyun.com/dav/", // webdev同步盘地址
"user": "", // webdev用户名
"password": "" // webdev密码
} // webdev 用于备份
}, // [3.3.4版本启用]
"restoreWindowPositionAndSize" : false, // 弃用
Expand Down
2 changes: 1 addition & 1 deletion src/main/core/db/magrite/data/update3_3_3_to3_3_4.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ const update3_3_3_to3_3_4 = () => {
if (db.get(TABLE_NAME).find({ key: "barrage" }).value()?.value) {
db.get(TABLE_NAME).remove({ key: 'barrage' }).write();
}
db.get(TABLE_NAME).insert({ key: "barrage", value: { url: '', key: '', support: '', start: '', mode: '', color: '', content: ''} }).write();
db.get(TABLE_NAME).insert({ key: "barrage", value: { url: "", key: "danmuku", support: ["qq", "qiyi", "youku", "mgtv"], start: "0", mode: "1", color: "2", content: "4" } }).write();
if (db.get(TABLE_NAME).find({ key: "playerMode" }).value()?.value) {
db.get(TABLE_NAME).remove({ key: 'playerMode' }).write();
}
Expand Down
22 changes: 11 additions & 11 deletions src/renderer/src/pages/setting/base/components/DialogData.vue
Original file line number Diff line number Diff line change
Expand Up @@ -404,21 +404,21 @@ const formatSet = (data) => {
// 更新或添加新键值对
const newEntries = [
{ key: 'windowPosition', value: { status: _.get(data, ['restoreWindowPositionAndSize', 'value'], false), position: { width: 1000, height: 640 } } },
{ key: 'webdev', value: {
{ key: "windowPosition", value: { status: _.get(data, ["restoreWindowPositionAndSize", "value"], false), position: { width: 1000, height: 640 } } },
{ key: "webdev", value: {
sync: false, data: {
url: _.get(data, ['webdevUrl', 'value'], 'https://dav.jianguoyun.com/dav/'),
username: _.get(data, ['webdevUsername', 'value'], ''),
password: _.get(data, ['webdevPassword', 'value'], '')
url: _.get(data, ["webdevUrl", "value"], "https://dav.jianguoyun.com/dav/"),
username: _.get(data, ["webdevUsername", "value"], ""),
password: _.get(data, ["webdevPassword", "value"], "")
}
}
},
{ key: 'lang', value: 'zh_CN' },
{ key: 'defaultViewCasual', value: '' },
{ key: 'barrage', value: { url: '', key: '', support: [], start: '', mode: '', color: '', content: ''} },
{ key: 'playerMode', value: { type: _.get(data, ['broadcasterType', 'value'], 'xgplayer'), external: _.get(data, ['externalPlayer', 'value'], '') } },
{ key: 'snifferMode', value: { type: _.get(data, ['snifferType', 'value'], 'pie'), url: '' } },
{ key: 'version', value: pkgVersion },
{ key: "lang", value: "zh_CN" },
{ key: "defaultViewCasual", value: "" },
{ key: "barrage", value: { url: "", key: "danmuku", support: ["qq", "qiyi", "youku", "mgtv"], start: "0", mode: "1", color: "2", content: "4" } },
{ key: "playerMode", value: { type: _.get(data, ["broadcasterType", "value"], 'xgplayer'), external: _.get(data, ["externalPlayer", "value"], '') } },
{ key: "snifferMode", value: { type: _.get(data, ["snifferType", "value"], "pie"), url: "" } },
{ key: "version", value: pkgVersion },
// ... 其他新键值对
];
Expand Down

0 comments on commit 6a49671

Please sign in to comment.