mirror of
https://github.com/HChaZZY/PiliPlus.git
synced 2025-12-06 09:13:48 +08:00
@@ -89,8 +89,13 @@ class DynamicsController extends GetxController
|
||||
String cover = item.modules.moduleDynamic.major.archive.cover;
|
||||
try {
|
||||
int cid = await SearchHttp.ab2c(bvid: bvid);
|
||||
Utils.toDupNamed('/video?bvid=$bvid&cid=$cid',
|
||||
arguments: {'pic': cover, 'heroTag': bvid});
|
||||
Utils.toDupNamed(
|
||||
'/video?bvid=$bvid&cid=$cid',
|
||||
arguments: {
|
||||
'pic': cover,
|
||||
'heroTag': Utils.makeHeroTag(bvid),
|
||||
},
|
||||
);
|
||||
} catch (err) {
|
||||
SmartDialog.showToast(err.toString());
|
||||
}
|
||||
@@ -162,8 +167,13 @@ class DynamicsController extends GetxController
|
||||
String bvid = IdUtils.av2bv(aid);
|
||||
String cover = ugcSeason.cover!;
|
||||
int cid = await SearchHttp.ab2c(bvid: bvid);
|
||||
Utils.toDupNamed('/video?bvid=$bvid&cid=$cid',
|
||||
arguments: {'pic': cover, 'heroTag': bvid});
|
||||
Utils.toDupNamed(
|
||||
'/video?bvid=$bvid&cid=$cid',
|
||||
arguments: {
|
||||
'pic': cover,
|
||||
'heroTag': Utils.makeHeroTag(bvid),
|
||||
},
|
||||
);
|
||||
break;
|
||||
|
||||
/// 番剧查看
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
import 'package:PiliPalaX/utils/utils.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_smart_dialog/flutter_smart_dialog.dart';
|
||||
import 'package:get/get.dart';
|
||||
@@ -34,8 +35,13 @@ Widget addWidget(item, context, type, {floor = 1}) {
|
||||
String cover = dynamicProperty[type].cover;
|
||||
try {
|
||||
int cid = await SearchHttp.ab2c(bvid: bvid);
|
||||
Get.toNamed('/video?bvid=$bvid&cid=$cid',
|
||||
arguments: {'pic': cover, 'heroTag': bvid});
|
||||
Get.toNamed(
|
||||
'/video?bvid=$bvid&cid=$cid',
|
||||
arguments: {
|
||||
'pic': cover,
|
||||
'heroTag': Utils.makeHeroTag(bvid),
|
||||
},
|
||||
);
|
||||
} catch (err) {
|
||||
SmartDialog.showToast(err.toString());
|
||||
}
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import 'package:PiliPalaX/models/dynamics/result.dart';
|
||||
import 'package:PiliPalaX/utils/utils.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_smart_dialog/flutter_smart_dialog.dart';
|
||||
import 'package:get/get.dart';
|
||||
@@ -237,8 +238,13 @@ InlineSpan? richNode(item, context) {
|
||||
onTap: () async {
|
||||
try {
|
||||
int cid = await SearchHttp.ab2c(bvid: i.rid);
|
||||
Get.toNamed('/video?bvid=${i.rid}&cid=$cid',
|
||||
arguments: {'pic': null, 'heroTag': i.rid});
|
||||
Get.toNamed(
|
||||
'/video?bvid=${i.rid}&cid=$cid',
|
||||
arguments: {
|
||||
'pic': null,
|
||||
'heroTag': Utils.makeHeroTag(i.rid),
|
||||
},
|
||||
);
|
||||
} catch (err) {
|
||||
SmartDialog.showToast(err.toString());
|
||||
}
|
||||
|
||||
@@ -136,12 +136,11 @@ class FavDetailController extends MultiSelectController {
|
||||
if (element.bvid != list.first.bvid) {
|
||||
SmartDialog.showToast('已跳过不支持播放的视频');
|
||||
}
|
||||
final String heroTag = Utils.makeHeroTag(element.bvid);
|
||||
Get.toNamed(
|
||||
'/video?bvid=${element.bvid}&cid=${element.cid}',
|
||||
arguments: {
|
||||
'videoItem': element,
|
||||
'heroTag': heroTag,
|
||||
'heroTag': Utils.makeHeroTag(element.bvid),
|
||||
'sourceType': 'fav',
|
||||
'mediaId': item.value.id,
|
||||
'oid': element.id,
|
||||
|
||||
@@ -37,7 +37,6 @@ class FavVideoCardH extends StatelessWidget {
|
||||
Widget build(BuildContext context) {
|
||||
int id = videoItem.id;
|
||||
String bvid = videoItem.bvid ?? IdUtils.av2bv(id);
|
||||
String heroTag = Utils.makeHeroTag(id);
|
||||
return InkWell(
|
||||
onTap: () async {
|
||||
if (onTap != null) {
|
||||
@@ -68,12 +67,16 @@ class FavVideoCardH extends StatelessWidget {
|
||||
// if (seasonId != null) {
|
||||
// parameters['seasonId'] = seasonId.toString();
|
||||
// }
|
||||
Get.toNamed('/video', parameters: parameters, arguments: {
|
||||
'videoItem': videoItem,
|
||||
'heroTag': heroTag,
|
||||
'videoType':
|
||||
epId != null ? SearchType.media_bangumi : SearchType.video,
|
||||
});
|
||||
Get.toNamed(
|
||||
'/video',
|
||||
parameters: parameters,
|
||||
arguments: {
|
||||
'videoItem': videoItem,
|
||||
'heroTag': Utils.makeHeroTag(id),
|
||||
'videoType':
|
||||
epId != null ? SearchType.media_bangumi : SearchType.video,
|
||||
},
|
||||
);
|
||||
},
|
||||
onLongPress: () {
|
||||
if (onLongPress != null) {
|
||||
@@ -109,13 +112,10 @@ class FavVideoCardH extends StatelessWidget {
|
||||
double maxHeight = boxConstraints.maxHeight;
|
||||
return Stack(
|
||||
children: [
|
||||
Hero(
|
||||
tag: heroTag,
|
||||
child: NetworkImgLayer(
|
||||
src: videoItem.pic,
|
||||
width: maxWidth,
|
||||
height: maxHeight,
|
||||
),
|
||||
NetworkImgLayer(
|
||||
src: videoItem.pic,
|
||||
width: maxWidth,
|
||||
height: maxHeight,
|
||||
),
|
||||
PBadge(
|
||||
text: Utils.timeFormat(videoItem.duration!),
|
||||
|
||||
@@ -32,7 +32,6 @@ class HistoryItem extends StatelessWidget {
|
||||
Widget build(BuildContext context) {
|
||||
int aid = videoItem.history.oid;
|
||||
String bvid = videoItem.history.bvid ?? IdUtils.av2bv(aid);
|
||||
String heroTag = Utils.makeHeroTag(aid);
|
||||
return InkWell(
|
||||
onTap: () async {
|
||||
if (ctr is MultiSelectController && ctr!.enableMultiSelect.value) {
|
||||
@@ -79,26 +78,19 @@ class HistoryItem extends StatelessWidget {
|
||||
var result = await VideoHttp.videoIntro(bvid: bvid);
|
||||
if (result['status']) {
|
||||
String bvid = result['data'].bvid!;
|
||||
int cid = result['data'].cid!;
|
||||
// String pic = result['data'].pic!;
|
||||
String heroTag = Utils.makeHeroTag(cid);
|
||||
var epid = result['data'].epId;
|
||||
if (epid != null) {
|
||||
Utils.viewBangumi(epId: epid);
|
||||
// Get.toNamed(
|
||||
// '/video?bvid=$bvid&cid=$cid&seasonId=${result['data'].seasonId}&epId=${result['data'].epId}',
|
||||
// arguments: {
|
||||
// 'pic': pic,
|
||||
// 'heroTag': heroTag,
|
||||
// 'videoType': SearchType.media_bangumi,
|
||||
// },
|
||||
// );
|
||||
} else {
|
||||
int cid = videoItem.history.cid ??
|
||||
// videoItem.history.oid ??
|
||||
await SearchHttp.ab2c(aid: aid, bvid: bvid);
|
||||
Get.toNamed('/video?bvid=$bvid&cid=$cid',
|
||||
arguments: {'heroTag': heroTag, 'pic': videoItem.cover});
|
||||
Get.toNamed(
|
||||
'/video?bvid=$bvid&cid=$cid',
|
||||
arguments: {
|
||||
'heroTag': Utils.makeHeroTag(cid),
|
||||
'pic': videoItem.cover,
|
||||
},
|
||||
);
|
||||
}
|
||||
} else {
|
||||
SmartDialog.showToast(result['msg']);
|
||||
@@ -147,8 +139,13 @@ class HistoryItem extends StatelessWidget {
|
||||
int cid = videoItem.history.cid ??
|
||||
// videoItem.history.oid ??
|
||||
await SearchHttp.ab2c(aid: aid, bvid: bvid);
|
||||
Get.toNamed('/video?bvid=$bvid&cid=$cid',
|
||||
arguments: {'heroTag': heroTag, 'pic': videoItem.cover});
|
||||
Get.toNamed(
|
||||
'/video?bvid=$bvid&cid=$cid',
|
||||
arguments: {
|
||||
'heroTag': Utils.makeHeroTag(aid),
|
||||
'pic': videoItem.cover,
|
||||
},
|
||||
);
|
||||
}
|
||||
},
|
||||
onLongPress: () {
|
||||
@@ -191,16 +188,13 @@ class HistoryItem extends StatelessWidget {
|
||||
double maxHeight = boxConstraints.maxHeight;
|
||||
return Stack(
|
||||
children: [
|
||||
Hero(
|
||||
tag: heroTag,
|
||||
child: NetworkImgLayer(
|
||||
radius: 12,
|
||||
src: (videoItem.cover != ''
|
||||
? videoItem.cover
|
||||
: videoItem.covers.first),
|
||||
width: maxWidth,
|
||||
height: maxHeight,
|
||||
),
|
||||
NetworkImgLayer(
|
||||
radius: 12,
|
||||
src: (videoItem.cover != ''
|
||||
? videoItem.cover
|
||||
: videoItem.covers.first),
|
||||
width: maxWidth,
|
||||
height: maxHeight,
|
||||
),
|
||||
if (!BusinessType
|
||||
.hiddenDurationType.hiddenDurationType
|
||||
|
||||
@@ -177,12 +177,11 @@ class LaterController extends MultiSelectController {
|
||||
if (item.bvid != list.first.bvid) {
|
||||
SmartDialog.showToast('已跳过不支持播放的视频');
|
||||
}
|
||||
final String heroTag = Utils.makeHeroTag(item.bvid);
|
||||
Get.toNamed(
|
||||
'/video?bvid=${item.bvid}&cid=${item.cid}',
|
||||
arguments: {
|
||||
'videoItem': item,
|
||||
'heroTag': heroTag,
|
||||
'heroTag': Utils.makeHeroTag(item.bvid),
|
||||
'sourceType': 'watchLater',
|
||||
'count': list.length,
|
||||
'favTitle': '稍后再看',
|
||||
|
||||
@@ -18,7 +18,6 @@ class MemberCoinsItem extends StatelessWidget {
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
String heroTag = Utils.makeHeroTag(coinItem.aid);
|
||||
return Card(
|
||||
elevation: 0,
|
||||
clipBehavior: Clip.hardEdge,
|
||||
@@ -27,8 +26,13 @@ class MemberCoinsItem extends StatelessWidget {
|
||||
onTap: () async {
|
||||
int cid =
|
||||
await SearchHttp.ab2c(aid: coinItem.aid, bvid: coinItem.bvid);
|
||||
Get.toNamed('/video?bvid=${coinItem.bvid}&cid=$cid',
|
||||
arguments: {'videoItem': coinItem, 'heroTag': heroTag});
|
||||
Get.toNamed(
|
||||
'/video?bvid=${coinItem.bvid}&cid=$cid',
|
||||
arguments: {
|
||||
'videoItem': coinItem,
|
||||
'heroTag': Utils.makeHeroTag(coinItem.aid)
|
||||
},
|
||||
);
|
||||
},
|
||||
child: Column(
|
||||
children: [
|
||||
|
||||
@@ -258,7 +258,9 @@ class SearchDynamic extends StatelessWidget {
|
||||
onTap: () {
|
||||
Get.toNamed(
|
||||
'/video?bvid=${IdUtils.av2bv(json['aid'])}&cid=${json['cid']}',
|
||||
arguments: {'heroTag': Utils.makeHeroTag(json['aid'])},
|
||||
arguments: {
|
||||
'heroTag': Utils.makeHeroTag(json['aid']),
|
||||
},
|
||||
);
|
||||
},
|
||||
title: Text(
|
||||
|
||||
@@ -17,7 +17,6 @@ class MemberSeasonsItem extends StatelessWidget {
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
String heroTag = Utils.makeHeroTag(seasonItem.aid);
|
||||
return Card(
|
||||
elevation: 0,
|
||||
clipBehavior: Clip.hardEdge,
|
||||
@@ -26,8 +25,13 @@ class MemberSeasonsItem extends StatelessWidget {
|
||||
onTap: () async {
|
||||
int cid =
|
||||
await SearchHttp.ab2c(aid: seasonItem.aid, bvid: seasonItem.bvid);
|
||||
Get.toNamed('/video?bvid=${seasonItem.bvid}&cid=$cid',
|
||||
arguments: {'videoItem': seasonItem, 'heroTag': heroTag});
|
||||
Get.toNamed(
|
||||
'/video?bvid=${seasonItem.bvid}&cid=$cid',
|
||||
arguments: {
|
||||
'videoItem': seasonItem,
|
||||
'heroTag': Utils.makeHeroTag(seasonItem.aid)
|
||||
},
|
||||
);
|
||||
},
|
||||
child: Column(
|
||||
children: [
|
||||
@@ -38,13 +42,10 @@ class MemberSeasonsItem extends StatelessWidget {
|
||||
double maxHeight = boxConstraints.maxHeight;
|
||||
return Stack(
|
||||
children: [
|
||||
Hero(
|
||||
tag: heroTag,
|
||||
child: NetworkImgLayer(
|
||||
src: seasonItem.pic,
|
||||
width: maxWidth,
|
||||
height: maxHeight,
|
||||
),
|
||||
NetworkImgLayer(
|
||||
src: seasonItem.pic,
|
||||
width: maxWidth,
|
||||
height: maxHeight,
|
||||
),
|
||||
if (seasonItem.pubdate != null)
|
||||
PBadge(
|
||||
|
||||
@@ -73,7 +73,6 @@ class SearchPanelController extends CommonController {
|
||||
}
|
||||
if (matchKeys.isNotEmpty && searchType == SearchType.video ||
|
||||
aid.toString() == keyword) {
|
||||
String heroTag = Utils.makeHeroTag(bvid);
|
||||
int cid = await SearchHttp.ab2c(aid: aid, bvid: bvid);
|
||||
if (matchKeys.isNotEmpty &&
|
||||
matchKeys.first == 'BV' &&
|
||||
@@ -84,7 +83,10 @@ class SearchPanelController extends CommonController {
|
||||
aid.toString() == keyword) {
|
||||
Get.toNamed(
|
||||
'/video?bvid=$bvid&cid=$cid',
|
||||
arguments: {'videoItem': resultList.first, 'heroTag': heroTag},
|
||||
arguments: {
|
||||
'videoItem': resultList.first,
|
||||
'heroTag': Utils.makeHeroTag(bvid),
|
||||
},
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -26,7 +26,6 @@ class SubVideoCardH extends StatelessWidget {
|
||||
Widget build(BuildContext context) {
|
||||
int id = videoItem.id!;
|
||||
String bvid = videoItem.bvid!;
|
||||
String heroTag = Utils.makeHeroTag(id);
|
||||
return InkWell(
|
||||
onTap: () async {
|
||||
int cid = await SearchHttp.ab2c(bvid: bvid);
|
||||
@@ -35,11 +34,15 @@ class SubVideoCardH extends StatelessWidget {
|
||||
'cid': cid.toString(),
|
||||
};
|
||||
|
||||
Get.toNamed('/video', parameters: parameters, arguments: {
|
||||
'videoItem': videoItem,
|
||||
'heroTag': heroTag,
|
||||
'videoType': SearchType.video,
|
||||
});
|
||||
Get.toNamed(
|
||||
'/video',
|
||||
parameters: parameters,
|
||||
arguments: {
|
||||
'videoItem': videoItem,
|
||||
'heroTag': Utils.makeHeroTag(id),
|
||||
'videoType': SearchType.video,
|
||||
},
|
||||
);
|
||||
},
|
||||
onLongPress: () => imageSaveDialog(
|
||||
context: context,
|
||||
@@ -69,13 +72,10 @@ class SubVideoCardH extends StatelessWidget {
|
||||
double maxHeight = boxConstraints.maxHeight;
|
||||
return Stack(
|
||||
children: [
|
||||
Hero(
|
||||
tag: heroTag,
|
||||
child: NetworkImgLayer(
|
||||
src: videoItem.cover,
|
||||
width: maxWidth,
|
||||
height: maxHeight,
|
||||
),
|
||||
NetworkImgLayer(
|
||||
src: videoItem.cover,
|
||||
width: maxWidth,
|
||||
height: maxHeight,
|
||||
),
|
||||
PBadge(
|
||||
text: Utils.timeFormat(videoItem.duration!),
|
||||
|
||||
@@ -765,13 +765,23 @@ class VideoIntroController extends GetxController
|
||||
(relatedCtr.loadingState.value as Success).response[0];
|
||||
try {
|
||||
if (videoItem.cid != null) {
|
||||
Get.offNamed('/video?bvid=${videoItem.bvid}&cid=${videoItem.cid}',
|
||||
arguments: {'videoItem': videoItem, 'heroTag': heroTag});
|
||||
Get.offNamed(
|
||||
'/video?bvid=${videoItem.bvid}&cid=${videoItem.cid}',
|
||||
arguments: {
|
||||
'videoItem': videoItem,
|
||||
'heroTag': heroTag,
|
||||
},
|
||||
);
|
||||
// changeSeasonOrbangu(videoItem.bvid, videoItem.cid, videoItem.aid);
|
||||
} else {
|
||||
SearchHttp.ab2c(aid: videoItem.aid, bvid: videoItem.bvid).then((cid) =>
|
||||
Get.offNamed('/video?bvid=${videoItem.bvid}&cid=${videoItem.cid}',
|
||||
arguments: {'videoItem': videoItem, 'heroTag': heroTag}));
|
||||
SearchHttp.ab2c(aid: videoItem.aid, bvid: videoItem.bvid).then(
|
||||
(cid) => Get.offNamed(
|
||||
'/video?bvid=${videoItem.bvid}&cid=${videoItem.cid}',
|
||||
arguments: {
|
||||
'videoItem': videoItem,
|
||||
'heroTag': heroTag,
|
||||
}),
|
||||
);
|
||||
}
|
||||
} catch (err) {
|
||||
SmartDialog.showToast(err.toString());
|
||||
|
||||
@@ -1087,7 +1087,7 @@ class _VideoDetailPageState extends State<VideoDetailPage>
|
||||
|
||||
Widget get plPlayer => Obx(
|
||||
() => videoDetailController.videoState.value is! Success
|
||||
? nil
|
||||
? const SizedBox.shrink()
|
||||
: !videoDetailController.autoPlay.value ||
|
||||
plPlayerController == null ||
|
||||
plPlayerController!.videoController == null
|
||||
|
||||
@@ -164,13 +164,14 @@ class ChatItem extends StatelessWidget {
|
||||
SmartDialog.showLoading();
|
||||
var bvid = content["bvid"];
|
||||
final int cid = await SearchHttp.ab2c(bvid: bvid);
|
||||
final String heroTag = Utils.makeHeroTag(bvid);
|
||||
SmartDialog.dismiss<dynamic>().then(
|
||||
(e) => Get.toNamed<dynamic>('/video?bvid=$bvid&cid=$cid',
|
||||
arguments: <String, String?>{
|
||||
'pic': content['thumb'],
|
||||
'heroTag': heroTag,
|
||||
}),
|
||||
(e) => Get.toNamed<dynamic>(
|
||||
'/video?bvid=$bvid&cid=$cid',
|
||||
arguments: <String, String?>{
|
||||
'pic': content['thumb'],
|
||||
'heroTag': Utils.makeHeroTag(bvid),
|
||||
},
|
||||
),
|
||||
);
|
||||
},
|
||||
child: NetworkImgLayer(
|
||||
@@ -211,13 +212,14 @@ class ChatItem extends StatelessWidget {
|
||||
SmartDialog.showLoading();
|
||||
var bvid = content["bvid"];
|
||||
final int cid = await SearchHttp.ab2c(bvid: bvid);
|
||||
final String heroTag = Utils.makeHeroTag(bvid);
|
||||
SmartDialog.dismiss<dynamic>().then(
|
||||
(e) => Get.toNamed<dynamic>('/video?bvid=$bvid&cid=$cid',
|
||||
arguments: <String, String?>{
|
||||
'pic': content['thumb'],
|
||||
'heroTag': heroTag,
|
||||
}),
|
||||
SmartDialog.dismiss().then(
|
||||
(_) => Get.toNamed(
|
||||
'/video?bvid=$bvid&cid=$cid',
|
||||
arguments: {
|
||||
'pic': content['thumb'],
|
||||
'heroTag': Utils.makeHeroTag(bvid),
|
||||
},
|
||||
),
|
||||
);
|
||||
} catch (err) {
|
||||
SmartDialog.dismiss();
|
||||
@@ -297,13 +299,12 @@ class ChatItem extends StatelessWidget {
|
||||
try {
|
||||
SmartDialog.showLoading();
|
||||
final int cid = await SearchHttp.ab2c(bvid: bvid);
|
||||
final String heroTag = Utils.makeHeroTag(bvid);
|
||||
SmartDialog.dismiss<dynamic>().then(
|
||||
(e) => Get.toNamed<dynamic>(
|
||||
'/video?bvid=$bvid&cid=$cid',
|
||||
arguments: <String, String?>{
|
||||
'pic': i['cover_url'],
|
||||
'heroTag': heroTag,
|
||||
'heroTag': Utils.makeHeroTag(bvid),
|
||||
}),
|
||||
);
|
||||
} catch (err) {
|
||||
|
||||
Reference in New Issue
Block a user