1
0
Fork 0
mirror of https://github.com/DanielnetoDotCom/YouPHPTube synced 2025-10-03 09:49:28 +02:00
Oinktube/install/getMp3FromAll.php
2024-07-26 18:26:06 -03:00

21 lines
631 B
PHP

<?php
//streamer config
require_once __DIR__.'/../videos/configuration.php';
ob_end_flush();
if (!isCommandLineInterface()) {
return die('Command Line only');
}
$global['rowCount'] = 99999;
$total = Video::getTotalVideos("", false, true, true, false, false);
$videos = Video::getAllVideosLight("", false, true, false);
$count = 0;
foreach ($videos as $value) {
$count++;
if($value['type'] !== 'video'){
continue;
}
$updated = convertVideoToMP3FileIfNotExists($value['id']);
echo "getMP3: {$count}/{$total} (".($updated ? "success" : "fail").") [{$value['id']}] {$value['title']}".PHP_EOL;
}
die();