Skip to content

Commit

Permalink
Add drpy/tvbox to import more data with one click.
Browse files Browse the repository at this point in the history
  • Loading branch information
Hiram committed Sep 6, 2023
1 parent f5f7d98 commit c93462b
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 6 deletions.
1 change: 1 addition & 0 deletions src/pages/Iptv.vue
Original file line number Diff line number Diff line change
Expand Up @@ -798,6 +798,7 @@ const formatMoreTitle = (item, list) => {
left: 50%;
top: 50%;
transform: translate(-50%, -50%);
border-radius: 5px;
}
}
.card-footer {
Expand Down
19 changes: 13 additions & 6 deletions src/pages/setting/base/components/DialogData.vue
Original file line number Diff line number Diff line change
Expand Up @@ -324,17 +324,17 @@ const easyConfig = async() => {
type: type === 1 ? 2 : 1,
api: item.api,
group: type === 1 ? 'drpy' : 'tvbox',
search: item.searchable,
search: _.has(item, "searchable") ? item.searchable : 0,
isActive: true,
status: true,
}));
}
};
if (_.has(config, "lives")) {
// 提取group为"redirect"的channels
const redirectChannels = config.lives.filter(live => live.group === "redirect")[0].channels;
const redirectChannels = config.lives.filter((live) => live.group === "redirect")[0].channels;
// 解密URL中的ext并组合成iptv对象
const iptv = redirectChannels.map(channel => {
const iptv = redirectChannels.map((channel) => {
const ext = channel.urls[0].split('&ext=')[1];
const decodedExt = Buffer.from(ext, 'base64').toString('utf-8');
Expand All @@ -346,8 +346,15 @@ const easyConfig = async() => {
};
});
data["iptv"] = iptv;
}
};
if (_.has(config, "parses")) {
const analyze = config.parses.map((item) => ({
name: item.name,
url: item.url,
isActive: true,
}));
data["analyze"] = analyze;
};
};
console.log(data)
Expand Down

0 comments on commit c93462b

Please sign in to comment.