mirror of
https://github.com/HChaZZY/PiliPlus.git
synced 2025-12-06 09:13:48 +08:00
opt: heartbeat
Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
@@ -2022,7 +2022,10 @@ class VideoDetailController extends GetxController
|
||||
}
|
||||
|
||||
void makeHeartBeat() {
|
||||
if (enableHeart && playedTime != null) {
|
||||
if (enableHeart &&
|
||||
plPlayerController.playerStatus.status.value !=
|
||||
PlayerStatus.completed &&
|
||||
playedTime != null) {
|
||||
plPlayerController.makeHeartBeat(
|
||||
data.timeLength != null
|
||||
? (data.timeLength! - playedTime!.inMilliseconds).abs() <= 1000
|
||||
|
||||
@@ -1303,6 +1303,9 @@ class PlPlayerController {
|
||||
}
|
||||
bool isComplete = playerStatus.status.value == PlayerStatus.completed ||
|
||||
type == 'completed';
|
||||
if ((duration.value - position.value).inMilliseconds > 1000) {
|
||||
isComplete = false;
|
||||
}
|
||||
// 播放状态变化时,更新
|
||||
|
||||
if (type == 'status' || type == 'completed') {
|
||||
|
||||
Reference in New Issue
Block a user