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