fix(player): 使用高清首帧并稳定切集占位
This commit is contained in:
1 parent
0cb0ab0613
commit
2fef7470e0
10 files changed
+258
-33
No files matched your search
@@ -21,6 +21,7 @@ class Episode {
|
||||
this.likeCount,
|
||||
this.commentCount,
|
||||
this.thumbnailsUrl,
|
||||
this.posterUrl,
|
||||
});
|
||||
|
||||
final String id;
|
||||
@@ -37,12 +38,14 @@ class Episode {
|
||||
final int? likeCount;
|
||||
final int? commentCount;
|
||||
final String? thumbnailsUrl;
|
||||
final String? posterUrl;
|
||||
|
||||
Episode withVideoUrl(
|
||||
String url, {
|
||||
int? likeCount,
|
||||
int? commentCount,
|
||||
String? thumbnailsUrl,
|
||||
String? posterUrl,
|
||||
}) => Episode(
|
||||
id: id,
|
||||
number: number,
|
||||
@@ -54,6 +57,7 @@ class Episode {
|
||||
likeCount: likeCount ?? this.likeCount,
|
||||
commentCount: commentCount ?? this.commentCount,
|
||||
thumbnailsUrl: thumbnailsUrl ?? this.thumbnailsUrl,
|
||||
posterUrl: posterUrl ?? this.posterUrl,
|
||||
);
|
||||
|
||||
factory Episode.fromJson(Map<String, dynamic> json) {
|
||||
@@ -68,6 +72,7 @@ class Episode {
|
||||
likeCount: _optionalInt(json['likeCount']),
|
||||
commentCount: _optionalInt(json['commentCount']),
|
||||
thumbnailsUrl: _optionalString(json['thumbnailsUrl']),
|
||||
posterUrl: _optionalString(json['posterUrl']),
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -324,4 +329,4 @@ String _genreText(List<Map<String, String>> types, Object? fallback) {
|
||||
final joined = names.join(' / ');
|
||||
if (joined.isNotEmpty) return joined;
|
||||
return fallback is String ? fallback : '';
|
||||
}
|
||||
}
|
||||
@@ -16,6 +16,7 @@ class PlayTicket {
|
||||
this.qualities = const [],
|
||||
this.tracks = const [],
|
||||
this.thumbnailsUrl,
|
||||
this.posterUrl,
|
||||
this.likeCount,
|
||||
this.commentCount,
|
||||
});
|
||||
@@ -46,6 +47,7 @@ class PlayTicket {
|
||||
/// 各档签名地址。AUTO 是主列表,点选其它档位时换成对应地址。
|
||||
final List<PlayQualityTrack> tracks;
|
||||
final String? thumbnailsUrl;
|
||||
final String? posterUrl;
|
||||
final int? likeCount;
|
||||
final int? commentCount;
|
||||
|
||||
@@ -70,6 +72,7 @@ class PlayTicket {
|
||||
.toList(),
|
||||
tracks: _tracks(json['tracks'], json['playUrl'] as String? ?? ''),
|
||||
thumbnailsUrl: _optionalString(json['thumbnailsUrl']),
|
||||
posterUrl: _optionalString(json['posterUrl']),
|
||||
likeCount: json['likeCount'] == null
|
||||
? null
|
||||
: jsonToInt(json['likeCount']),
|
||||
|
||||
Reference in new issue
Block a user