1
0
Fork 0
mirror of https://github.com/DanielnetoDotCom/YouPHPTube synced 2025-10-03 01:39:24 +02:00

Refactor Video Status Constants

- Updated references from Video::$status* to Video::STATUS_* for consistency across multiple files.
- Ensured that all instances of video status checks and assignments utilize the new constant format.
- This change improves code readability and maintainability by standardizing the way video statuses are referenced throughout the codebase.
This commit is contained in:
Daniel Neto 2025-07-11 12:52:02 -03:00
parent 0c05672df9
commit 8db8d44a92
32 changed files with 442 additions and 401 deletions

View file

@ -93,8 +93,8 @@ $channelName = $info['channelName'];
$channelURL = $info['channelURL'];
echo ("importChannel: start {$siteURL} {$channelName}").PHP_EOL;
$users_id = 0;
while (empty($users_id)) {
$_GET['searchPhrase'] = '';
@ -161,7 +161,7 @@ while ($hasNewContent && !empty($users_id)) {
$video->setUsers_id($users_id);
$video->setRrating($value->rrating);
$video->setExternalOptions($value->externalOptions);
$video->setStatus(Video::$statusTranfering);
$video->setStatus(Video::STATUS_TRANFERING);
echo ("importChannel: Saving video").PHP_EOL;
$id = $video->save(false, true);
@ -184,10 +184,10 @@ while ($hasNewContent && !empty($users_id)) {
download($value->videos->mp3, $value->filename, $path);
}
$video->setStatus(Video::$statusActive);
$video->setStatus(Video::STATUS_ACTIVE);
} else {
echo ("importChannel: ERROR Video NOT saved").PHP_EOL;
$video->setStatus(Video::$statusBrokenMissingFiles);
$video->setStatus(Video::STATUS_BROKEN_MISSING_FILES);
}
$video->save(false, true);
//exit;