Skip to content

Commit

Permalink
Fix cào nguồn C
Browse files Browse the repository at this point in the history
Fix cào nhầm năm với quốc gia
  • Loading branch information
apiiphim authored Aug 6, 2024
1 parent 882f896 commit 8f222b4
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions application/admin/controller/Collect.php
Original file line number Diff line number Diff line change
Expand Up @@ -1289,8 +1289,14 @@ protected function add_nguonc_goc_movie($movie, $filterType = [])
protected function create_data_nguonc_goc($movie, $flag) {
$arrCat = array_map(function($cat) { return $cat['name']; }, $movie['category']['2']['list']);

$arrCountry = array_column($movie['category']['4']['list'], 'name');

$arrCountry = array_column($movie['category']['4']['list'], 'name');
$arrYear = $movie['category']['3']['list'][0]['name'];

if (is_numeric($arrCountry[0])) {
$arrCountry = array_column($movie['category']['3']['list'], 'name');
$arrYear = $movie['category']['4']['list'][0]['name'];
}

$arrActors = !empty($movie['casts']) ? (is_array($movie['casts']) ? $movie['casts'] : explode(", ", $movie['casts'])) : ["Đang cập nhật"];
$director = !empty($movie['director']) ? $movie['director'] : "Đang cập nhật";

Expand Down Expand Up @@ -1327,7 +1333,7 @@ protected function create_data_nguonc_goc($movie, $flag) {
'vod_remarks' => $movie['current_episode'],
'vod_area' => implode(",", $arrCountry),
'vod_lang' => $movie['language'],
'vod_year' => $movie['category']['3']['list'][0]['name'],
'vod_year' => $arrYear,
'vod_version' => $movie['quality'],
'vod_duration' => $movie['time'],
'vod_time' => time(),
Expand Down

0 comments on commit 8f222b4

Please sign in to comment.