<?php

namespace App\Console\Commands;

use App\Services\BilibiliService;
use Illuminate\Console\Command;

class BiliVideoCode extends Command
{
    /**
     * The name and signature of the console command.
     *
     * @var string
     */
    protected $signature = 'bili:nvtuan {type} {code}';

    /**
     * The console command description.
     *
     * @var string
     */
    protected $description = 'Command description';

    /**
     * Create a new command instance.
     *
     * @return void
     */
    public function __construct()
    {
        parent::__construct();
    }

    /**
     * Execute the console command.
     *
     * @return mixed
     * @throws \Exception
     */
    public function handle()
    {
//        dump($this->arguments());exit;
        //
        $bilibili = new BilibiliService();
//        $bilibili->queryPlayList();
//        $bilibili->queryUpVideoList(10278125);
        $bilibili->compareAndDownloadUpVideos();
//        $bilibili->queryDBCollectionList();
//        $bilibili->compareAndDownloadCollectionVideos();
//        $bilibili->queryFavList();
//        $bilibili->queryCollectionList();
//        $bilibili->compareAndDownloadNewVideos();
//        $bilibili->queryLocalUpVideoList();
//        $bilibili->queryForVideoParts();
//        $bilibili->queryDBCollectionList();
//        $bilibili->checkVideoHasDownload();

    }
}
