From 8df87556b7c8d4b49d7dc135668f93a218af7abd Mon Sep 17 00:00:00 2001 From: orz12 Date: Sat, 1 Jun 2024 12:05:11 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E7=89=B9=E6=AE=8A=E7=A9=BA=E7=99=BD?= =?UTF-8?q?=E5=AF=BC=E8=87=B4=E5=AD=97=E5=B9=95=E5=BC=82=E5=B8=B8=E4=B8=AD?= =?UTF-8?q?=E6=96=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/http/video.dart | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/http/video.dart b/lib/http/video.dart index 17187ec7..2914ab18 100644 --- a/lib/http/video.dart +++ b/lib/http/video.dart @@ -618,10 +618,10 @@ class VideoHttp { if (res.data != null) { String vttData = "WEBVTT\n\n"; for (var item in res.data['body']) { - vttData += "${item['sid']}\n"; + vttData += "${item['sid'] ?? 0}\n"; vttData += "${subtitleTimecode(item['from'])} --> ${subtitleTimecode(item['to'])}\n"; - vttData += "${item['content']}\n\n"; + vttData += "${item['content'].trim()}\n\n"; } subtitlesVtt.add({ 'language': i['lan'],