Skip to content

Commit

Permalink
fix #1071 采集网址入库重复规则增加跳转url
Browse files Browse the repository at this point in the history
  • Loading branch information
magicblack committed Oct 29, 2023
1 parent 7ac9530 commit b117281
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 6 deletions.
1 change: 1 addition & 0 deletions application/admin/view/system/configcollect.html
Original file line number Diff line number Diff line change
Expand Up @@ -532,6 +532,7 @@
<div class="layui-input-block">
<input type="checkbox" lay-skin="primary" name="collect[website][inrule][]" value="a" title="{:lang('name')}" checked disabled>
<input type="checkbox" lay-skin="primary" name="collect[website][inrule][]" value="b" title="{:lang('type')}" {if condition="strpos($config['collect']['website']['inrule'],'b') !==false"}checked {/if}>
<input type="checkbox" lay-skin="primary" name="collect[website][inrule][]" value="c" title="{:lang('jumpurl')}" {if condition="strpos($config['collect']['website']['inrule'],'c') !==false"}checked {/if}>
</div>
</div>

Expand Down
5 changes: 2 additions & 3 deletions application/api/controller/Provide.php
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ public function vod_json($res)
$v["vod_pic"] = $GLOBALS['config']['api']['vod']['imgurl'] . $v["vod_pic"];
}

if($this->_param['ac']=='videolist' || $this->_param['ac']=='detail'){
if ($this->_param['ac']=='videolist' || $this->_param['ac']=='detail') {
// 如果指定返回播放组,则只返回对应播放组的播放数据
// https://github.com/magicblack/maccms10/issues/957
if (!empty($GLOBALS['config']['api']['vod']['from'])) {
Expand Down Expand Up @@ -221,8 +221,7 @@ public function vod_json($res)
$res['list'][$k]['vod_play_server'] = join('$$$', $vod_play_server_list);
$res['list'][$k]['vod_play_note'] = join('$$$', $vod_play_note_list);
}
}
else {
} else {
if (!empty($GLOBALS['config']['api']['vod']['from'])) {
// 准备数据,逐个处理
$arr_from = explode('$$$', $v['vod_play_from']);
Expand Down
10 changes: 7 additions & 3 deletions application/common/model/Collect.php
Original file line number Diff line number Diff line change
Expand Up @@ -713,10 +713,9 @@ public function vod_data($param,$data,$show=1)

if (!$info) {
// 新增
if($param['opt'] == 2){
if ($param['opt'] == 2) {
$des= lang('model/collect/not_check_add');
}
else {
} else {
if ($param['filter'] == 1 || $param['filter'] == 2) {
$v['vod_play_from'] = (string)join('$$$', (array)$collect_filter['play'][$param['filter']]['cj_play_from_arr']);
$v['vod_play_url'] = (string)join('$$$', (array)$collect_filter['play'][$param['filter']]['cj_play_url_arr']);
Expand Down Expand Up @@ -2137,6 +2136,11 @@ public function website_data($param,$data,$show=1)
if (strpos($config['inrule'], 'b')!==false) {
$where['type_id'] = $v['type_id'];
}
// 采集网址入库重复规则建议增加跳转url
// https://github.com/magicblack/maccms10/issues/1071
if (strpos($config['inrule'], 'c')!==false) {
$where['website_jumpurl'] = $v['website_jumpurl'];
}

$info = model('Website')->where($where)->find();
if (!$info) {
Expand Down

0 comments on commit b117281

Please sign in to comment.