Browse Source

add result judge

feature/new_bilibili_and_instagram_sxs20191126
shixuesen 4 years ago
parent
commit
9a8de23ce0
1 changed files with 10 additions and 2 deletions
  1. +10
    -2
      app/Services/BilibiliServiceV2.php

+ 10
- 2
app/Services/BilibiliServiceV2.php View File

@ -282,7 +282,11 @@ class BilibiliServiceV2
$vItem->save(); $vItem->save();
} }
} else { } else {
$this->partDownloadBSitePlaylist($videoPartsMap, $this->remoteDir . "bilibili/", $item["up_name"]);
$result = $this->partDownloadBSitePlaylist($videoPartsMap, $this->remoteDir . "bilibili/", $item["up_name"]);
if ($result) {
$vItem["is_downloaded"] = 1;
$vItem->save();
}
} }
} }
@ -340,7 +344,11 @@ class BilibiliServiceV2
$vItem->save(); $vItem->save();
} }
} else { } else {
$this->partDownloadBSitePlaylist($videoPartsMap, $this->remoteDir . "bilibili", $item["title"]);
$result = $this->partDownloadBSitePlaylist($videoPartsMap, $this->remoteDir . "bilibili", $item["title"]);
if ($result) {
$vItem["is_downloaded"] = 1;
$vItem->save();
}
} }
} }


Loading…
Cancel
Save