File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 22
33更新日志文档,版本顺序从新到旧,最新版本在最前(上)面。
44
5+ # 1.4.4
6+ PS: 需要服务端版本 >= 1.0.4
7+
8+ - 切换驱动类型附件字幕URL为读取url接口
9+
510# 1.4.3
611PS: 需要服务端版本 >= 1.0.4
712
Original file line number Diff line number Diff line change @@ -61,4 +61,23 @@ class AttachmentApi {
6161 return "" ;
6262 }
6363 }
64+
65+
66+ Future <String > findDownUrlByAttachmentId (int attachmentId) async {
67+ String apiUrl =
68+ "/api/v1alpha1/attachment/url/download/id/$attachmentId " ;
69+ try {
70+ // print("queryParams: $queryParams");
71+ Dio dio = await DioClient .getDio ();
72+ var response = await dio.get (apiUrl);
73+ // print("response status code: ${response.statusCode}");
74+ if (response.statusCode != 200 ) {
75+ return "" ;
76+ }
77+ return response.data;
78+ } catch (e) {
79+ print (e);
80+ return "" ;
81+ }
82+ }
6483}
Original file line number Diff line number Diff line change @@ -186,8 +186,11 @@ class _SubjectEpisodesState extends State<SubjectEpisodesPage> {
186186 var subUrl = '' ;
187187 if (element.url.startsWith ("http" )) {
188188 subUrl = element.url;
189- } else {
189+ } else if (element.url. startsWith ( "/" )) {
190190 subUrl = _apiBaseUrl + element.url;
191+ } else {
192+ // 诸如网盘文件提取码这种情况
193+ subUrl = await AttachmentApi ().findDownUrlByAttachmentId (element.attachmentId);
191194 }
192195 subtitleUrls.add (subUrl);
193196 }
Original file line number Diff line number Diff line change 11name : ikaros
22description : ikaros app by flutter
3- version : 1.4.3
3+ version : 1.4.4
44
55environment :
66 sdk : ' >=2.18.4 <=3.10.5'
You can’t perform that action at this time.
0 commit comments