feat: add match live service helpers

This commit is contained in:
hajimi
2026-06-21 11:32:08 +08:00
parent 2496050ee7
commit dbdb418e15
2 changed files with 91 additions and 0 deletions
@@ -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";