|
@@ -719,6 +719,18 @@ class Notify extends Api
|
|
|
|
|
|
//视频注入结果查询
|
|
|
public function injectquery() {
|
|
|
+ $url = 'http://jscp.agency.gitv.tv/injectResult/v1/queryTv?cspId=' . config('cspid_zx') . '&cpAlbumId=121&cpTvId=121';
|
|
|
+ $header = [
|
|
|
+ 'Content-Type: application/json'
|
|
|
+ ];
|
|
|
+ $rs = httpRequest($url, 'GET', [], $header);
|
|
|
+ if (!$rs) {
|
|
|
+ echo 1;
|
|
|
+ }
|
|
|
+ $rs = json_decode($rs, true); p($rs);die;
|
|
|
+ if ($rs['code'] != 'A000000') {
|
|
|
+ echo 2;
|
|
|
+ }
|
|
|
set_time_limit(0);
|
|
|
|
|
|
$time = strtotime(date('Y-m-d', time()));
|
|
@@ -999,7 +1011,7 @@ class Notify extends Api
|
|
|
'tvIsOnline' => $params['status'],
|
|
|
'isPurchase' => $params['is_pay'],
|
|
|
'playOrder' => 1,
|
|
|
- 'tvUrl' => 'ftp://'.config('ftp_user').':'.config('ftp_pwd').'@'.config('ftp_ip').':'.config('ftp_port').'/'.$video_url
|
|
|
+ 'tvUrl' => 'ftp://'.config('ftp_user').':'.config('ftp_pwd').'@'.config('ftp_ip').':'.config('ftp_port').'/inject/'.$video_url
|
|
|
]
|
|
|
]
|
|
|
];
|
|
@@ -1020,4 +1032,68 @@ class Notify extends Api
|
|
|
echo 'wan bi';
|
|
|
die;
|
|
|
}
|
|
|
+
|
|
|
+ //(补漏)删除注入中兴视频
|
|
|
+ public function delinjectzx() {
|
|
|
+ set_time_limit(0);
|
|
|
+
|
|
|
+ $hu_video = Db::name('video');
|
|
|
+ $list = $hu_video->limit(1)->order('id')->select();
|
|
|
+
|
|
|
+ if (!$list) {
|
|
|
+ echo 'mei shu ju';
|
|
|
+ die;
|
|
|
+ }
|
|
|
+
|
|
|
+ $cspid = config('cspid_zx');
|
|
|
+ $url = 'http://jscp.agency.gitv.tv/epgDeleteSync/v1/' . $cspid . '/';
|
|
|
+
|
|
|
+ foreach ($list as &$params) {
|
|
|
+ //内容同步
|
|
|
+ $videofile = $params['videofile'];
|
|
|
+ $videofile = explode('/', $videofile);
|
|
|
+ $video_url = $videofile[3];
|
|
|
+
|
|
|
+ $data = [
|
|
|
+// 'cspId' => $cspid,
|
|
|
+ 'cpAlbumId' => $params['id'],
|
|
|
+ 'albumName' => $params['title'],
|
|
|
+ 'tvSets' => 1,
|
|
|
+ 'updateToSet' => 1,
|
|
|
+ 'isPurchase' => $params['is_pay'],
|
|
|
+ 'isEffective' => 0,
|
|
|
+ 'isOnline' => 2,
|
|
|
+ 'albumTypes' => '健康',
|
|
|
+ 'picBox' => config('upload.cdnurl') . $params['image'],
|
|
|
+ 'albumUpdateTime' => date('YmdHis', time()),
|
|
|
+// 'albumCreateTime' => date('YmdHis', time()),
|
|
|
+ 'tvlist' => [
|
|
|
+ [
|
|
|
+ 'cpAlbumId' => $params['id'],
|
|
|
+ 'cpTvId' => $params['id'],
|
|
|
+ 'tvName' => $params['title'],
|
|
|
+ 'tvIsEffective' => 0,
|
|
|
+ 'tvIsOnline' => 2,
|
|
|
+ 'isPurchase' => $params['is_pay'],
|
|
|
+ 'playOrder' => 1,
|
|
|
+ 'tvUrl' => 'ftp://'.config('ftp_user').':'.config('ftp_pwd').'@'.config('ftp_ip').':'.config('ftp_port').'/inject/'.$video_url
|
|
|
+ ]
|
|
|
+ ]
|
|
|
+ ];
|
|
|
+ $data = json_encode($data, 320);
|
|
|
+ $header = [
|
|
|
+ 'Content-Type: application/json'
|
|
|
+ ];
|
|
|
+ $rs = httpRequest($url, 'POST', $data, $header);
|
|
|
+ if ($rs) {
|
|
|
+ $rs = json_decode($rs, true);
|
|
|
+ if ($rs['code'] != 'A000000') {
|
|
|
+ continue;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ echo 'wan bi';
|
|
|
+ die;
|
|
|
+ }
|
|
|
}
|