Commit 2f205883 by Phạm Văn Đoan

fixbug ko lấy được id của keeng

parent d6486fa6
...@@ -71,7 +71,12 @@ class KeengCrawlerTrackCommand extends Command ...@@ -71,7 +71,12 @@ class KeengCrawlerTrackCommand extends Command
$track_db = Track::where('title', $track->name)->take(1)->get(); $track_db = Track::where('title', $track->name)->take(1)->get();
if (isset($track_db[0])) { if (isset($track_db[0])) {
$track_db[0]->link_keeng = isset($track->url) ? $track->url : null; $track_db[0]->link_keeng = isset($track->url) ? $track->url : null;
$track_db[0]->id_keeng = isset($track->identify) ? $track->identify : null; // ID keeng nằm ở 2 key data khác nhau, có bài chỉ ở 1 nơi nên phải check
$id_keeng = (isset($track->identify) && $track->identify != '') ? $track->identify : null;
if (empty($id_keeng)) {
$id_keeng = (isset($track->info_extra->identify)) ? $track->info_extra->identify : null;
}
$track_db[0]->id_keeng = $id_keeng;
if (empty($track_db[0]->singer_list)) { if (empty($track_db[0]->singer_list)) {
$track_db[0]->singer_list = isset($track->singer) ? $track->singer : null; $track_db[0]->singer_list = isset($track->singer) ? $track->singer : null;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment