Hi @norkunas !
Once again - thanks for your lib - works just fine for me !
Do you think it is possible changing options on the fly?
In my case , i need changing filename ('output' => 'Newfilename_with_getDisplayId_string') AFTER i grab file info with $infovid=$dl->getInfo($url);
however trying to access $options would generate error:
Cannot access protected property YoutubeDl\YoutubeDl::$options
To make it even more clearer code example :
$dl = new YoutubeDl([
'continue' => true,
'output' => 'TemporaryFilename.%(ext)s',
'restrict-filenames' => true,
]);
//get information on video:
$infovid=$dl->getInfo($url);
//this would generate new filename based on video ID
$newFileName= $this->generateNewFilename($infovid->getDisplayId());
//THIS LINE WONT WORK, BUT THATS WHAT I ACTUALLY NEED:
$dl->options['output']=$newFileName
//this would download to a NEW genarated filename.
$finalvideo = $dl->download($url);
Hope it makes snce, and easy doable :) Thanks in advance !
Hi @norkunas ! Once again - thanks for your lib - works just fine for me !
Do you think it is possible changing options on the fly? In my case , i need changing filename ('output' => 'Newfilename_with_getDisplayId_string') AFTER i grab file info with $infovid=$dl->getInfo($url);
however trying to access $options would generate error:
Cannot access protected property YoutubeDl\YoutubeDl::$options
To make it even more clearer code example :
Hope it makes snce, and easy doable :) Thanks in advance !