feat: add match live service helpers
This commit is contained in:
@@ -0,0 +1,28 @@
|
||||
<?php
|
||||
|
||||
$root = dirname(__DIR__, 2);
|
||||
$servicePath = $root . '/server/app/common/service/match/MatchLiveService.php';
|
||||
|
||||
if (!is_file($servicePath)) {
|
||||
fwrite(STDERR, "missing service file\n");
|
||||
exit(1);
|
||||
}
|
||||
|
||||
$service = file_get_contents($servicePath);
|
||||
$requiredTokens = [
|
||||
'class MatchLiveService',
|
||||
'public static function syncLegacyLiveUrl',
|
||||
'public static function getLiveListForApi',
|
||||
'public static function buildStreamOptions',
|
||||
'play_url_m3u8',
|
||||
'default_play_url',
|
||||
];
|
||||
|
||||
foreach ($requiredTokens as $needle) {
|
||||
if (strpos($service, $needle) === false) {
|
||||
fwrite(STDERR, "missing service token: {$needle}\n");
|
||||
exit(1);
|
||||
}
|
||||
}
|
||||
|
||||
echo "service static checks passed\n";
|
||||
Reference in New Issue
Block a user