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.3
6+ PS: 需要服务端版本 >= 1.0.4
7+
8+ - 切换附件URL为读取url接口
9+
510# 20.4.3
611
712PS: 需要服务端版本 >= 0.20.11
Original file line number Diff line number Diff line change @@ -9,17 +9,11 @@ ikaros app by flutter
99flutter packages pub run build_runner build
1010```
1111
12- # Version
13- APP的版本规定
12+ ## 核心版本适配情况
13+ 请根据ikaros server版本(core版本),选择合适的插件版本下载,
1414
15- 服务端版本.主版本.子版本
16-
17- app的服务端版本只取服务端版本的主版本和子版本,忽略第三级别的Bug版本,
18-
19- 比如当前APP适配的服务端是 0.15.5, 那么服务端版本就是15,此时APP的版本就是 15.3.0
20-
21- 如果服务端版本是1.0.0,此时服务端的子版本最大曾是两位数,则,app的服务端版本是 1 * 100 + 0 = 100
22- ,此时APP的版本就是 100.3.0
15+ 核心版本适配情况如下:
16+ - 插件版本1.x.x 到 现在:需要core版本大于1.0.4
2317
2418# Build
2519
Original file line number Diff line number Diff line change 1+ import 'dart:convert' ;
2+
13import 'package:crypto/crypto.dart' ;
24import 'package:dio/dio.dart' ;
35import 'package:flutter/foundation.dart' ;
6+ import 'package:ikaros/api/dio_client.dart' ;
47
58class AttachmentApi {
69
@@ -39,4 +42,23 @@ class AttachmentApi {
3942 }
4043 return List .empty ();
4144 }
45+
46+
47+ Future <String > findReadUrlByAttachmentId (int attachmentId) async {
48+ String apiUrl =
49+ "/api/v1alpha1/attachment/url/read/id/$attachmentId " ;
50+ try {
51+ // print("queryParams: $queryParams");
52+ Dio dio = await DioClient .getDio ();
53+ var response = await dio.get (apiUrl);
54+ // print("response status code: ${response.statusCode}");
55+ if (response.statusCode != 200 ) {
56+ return "" ;
57+ }
58+ return response.data;
59+ } catch (e) {
60+ print (e);
61+ return "" ;
62+ }
63+ }
4264}
Original file line number Diff line number Diff line change @@ -4,6 +4,7 @@ import 'dart:io';
44import 'package:dart_vlc/dart_vlc.dart' as DartVlc;
55import 'package:flutter/foundation.dart' ;
66import 'package:flutter/material.dart' ;
7+ import 'package:ikaros/api/attachment/AttachmentApi.dart' ;
78import 'package:ikaros/api/attachment/AttachmentRelationApi.dart' ;
89import 'package:ikaros/api/attachment/model/VideoSubtitle.dart' ;
910import 'package:ikaros/api/auth/AuthApi.dart' ;
@@ -156,7 +157,8 @@ class _SubjectEpisodesState extends State<SubjectEpisodesPage> {
156157 }
157158
158159 String coverUrl = UrlUtils .getCoverUrl (_apiBaseUrl, _subject? .cover ?? "" );
159- String videUrl = UrlUtils .getCoverUrl (_apiBaseUrl, episodeResource.url);
160+ // String videUrl = UrlUtils.getCoverUrl(_apiBaseUrl, episodeResource.url);
161+ String videUrl = await AttachmentApi ().findReadUrlByAttachmentId (episodeResource.attachmentId);
160162 String videoTitle = _getEpisodeName (episodeRecord.episode);
161163 String videoSubTitle = episodeResource.name;
162164
Original file line number Diff line number Diff line change 11name : ikaros
22description : ikaros app by flutter
3- version : 20 .4.3
3+ version : 1 .4.3
44
55environment :
66 sdk : ' >=2.18.4 <=3.10.5'
You can’t perform that action at this time.
0 commit comments