mirror of
https://github.com/bggRGjQaUbCoE/PiliPlus.git
synced 2026-04-20 03:06:59 +08:00
@@ -1,6 +1,5 @@
|
||||
import 'dart:convert';
|
||||
|
||||
import 'package:PiliPlus/build_config.dart';
|
||||
import 'package:PiliPlus/common/constants.dart';
|
||||
import 'package:PiliPlus/http/init.dart';
|
||||
import 'package:PiliPlus/http/loading_state.dart';
|
||||
@@ -137,7 +136,7 @@ abstract final class SponsorBlock {
|
||||
'videoID': bvid,
|
||||
'cid': cid.toString(),
|
||||
'userID': Pref.blockUserID,
|
||||
'userAgent': '${Constants.appName}/${BuildConfig.versionName}',
|
||||
'userAgent': Constants.userAgent,
|
||||
'videoDuration': videoDuration,
|
||||
'segments': segments
|
||||
.map(
|
||||
|
||||
@@ -4,6 +4,7 @@ import 'package:PiliPlus/models/common/video/audio_quality.dart';
|
||||
import 'package:PiliPlus/models/common/video/video_quality.dart';
|
||||
import 'package:PiliPlus/models_new/sponsor_block/segment_item.dart';
|
||||
import 'package:PiliPlus/utils/extension.dart';
|
||||
import 'package:flutter/foundation.dart' show kDebugMode;
|
||||
|
||||
class PlayUrlModel {
|
||||
PlayUrlModel({
|
||||
@@ -87,11 +88,15 @@ class PlayUrlModel {
|
||||
// "clipType": "CLIP_TYPE_ED",
|
||||
// },
|
||||
// ];
|
||||
final List? clipInfoList = json['clip_info_list'];
|
||||
if (clipInfoList != null && clipInfoList.isNotEmpty) {
|
||||
this.clipInfoList = clipInfoList
|
||||
.map((e) => SegmentItemModel.fromPgcJson(e, timeLength))
|
||||
.toList();
|
||||
try {
|
||||
final List? clipInfoList = json['clip_info_list'];
|
||||
if (clipInfoList != null && clipInfoList.isNotEmpty) {
|
||||
this.clipInfoList = clipInfoList
|
||||
.map((e) => SegmentItemModel.fromPgcJson(e, timeLength))
|
||||
.toList();
|
||||
}
|
||||
} catch (_) {
|
||||
if (kDebugMode) rethrow;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -7,7 +7,7 @@ class SegmentItemModel {
|
||||
List<int> segment;
|
||||
String uuid;
|
||||
num? videoDuration;
|
||||
int votes;
|
||||
int? votes;
|
||||
|
||||
SegmentItemModel({
|
||||
this.cid,
|
||||
@@ -16,7 +16,7 @@ class SegmentItemModel {
|
||||
required this.segment,
|
||||
required this.uuid,
|
||||
this.videoDuration,
|
||||
this.votes = 0,
|
||||
this.votes,
|
||||
});
|
||||
|
||||
factory SegmentItemModel.fromJson(Map<String, dynamic> json) =>
|
||||
|
||||
@@ -188,7 +188,8 @@ class _VideoReplyReplyPanelState extends State<VideoReplyReplyPanel>
|
||||
: const AlwaysScrollableScrollPhysics(),
|
||||
slivers: [
|
||||
if (!isDialogue) ...[
|
||||
if (widget.firstFloor case final firstFloor?)
|
||||
if ((widget.firstFloor ?? _controller.firstFloor.value)
|
||||
case final firstFloor?)
|
||||
_header(theme, firstFloor)
|
||||
else
|
||||
Obx(() {
|
||||
|
||||
Reference in New Issue
Block a user