From 0dec52806ba3d4e89db4da04e15512edd5eee0e5 Mon Sep 17 00:00:00 2001 From: xiaochong0302 Date: Mon, 4 Sep 2023 10:53:18 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E7=9B=B4=E6=92=AD=E6=B5=8B?= =?UTF-8?q?=E8=AF=95=E7=9A=84streamName=E8=A7=A3=E6=9E=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/Models/ChapterLive.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/app/Models/ChapterLive.php b/app/Models/ChapterLive.php index 44f764fa..34c17d96 100644 --- a/app/Models/ChapterLive.php +++ b/app/Models/ChapterLive.php @@ -99,11 +99,15 @@ class ChapterLive extends Model public static function generateStreamName($id) { + if ($id == 'test') return $id; + return sprintf('chapter-%03d', $id); } public static function parseFromStreamName($streamName) { + if ($streamName == 'test') return $streamName; + return (int)str_replace('chapter-', '', $streamName); }