Skip to content

Fix history resume playback when video streaming account differs from history account#241

Draft
Copilot wants to merge 4 commits intomainfrom
copilot/fix-video-streaming-issues
Draft

Fix history resume playback when video streaming account differs from history account#241
Copilot wants to merge 4 commits intomainfrom
copilot/fix-video-streaming-issues

Conversation

Copy link

Copilot AI commented Dec 14, 2025

When video streaming account (AccountType.video) differs from history recording account (AccountType.heartbeat), clicking history items used the wrong account's progress. Server's lastPlayTime comes from video account, but UI shows history account's progress.

Changes

  • Pass explicit progress parameter when navigating from history items to video pages (UGC, PGC, Cheese)
  • Handle fully watched videos by converting progress -1 to 0 to restart from beginning
  • Add helper methods _getProgressString() and _getProgressInt() to normalize progress conversion

Implementation

// Before: No progress passed, used server's lastPlayTime from video account
PageUtils.toVideoPage(aid: aid, bvid: bvid, cid: cid);

// After: Explicit progress from history account, -1 → 0 for fully watched
PageUtils.toVideoPage(
  aid: aid, 
  bvid: bvid, 
  cid: cid,
  progress: _getProgressInt(item.progress),  // -1 becomes 0
);

Video controller already prioritizes args['progress'] over data.lastPlayTime, so explicit parameter ensures correct playback position regardless of account mismatch.

Original prompt

This section details on the original issue you should resolve

<issue_title>fix</issue_title>
<issue_description>视频取流mid与记录历史mid不同时,
请使得使得视频取流账号与记录历史账号不同时,历史记录从断点续播的功能正常工作,从历史记录进入的已看完视频要从头开始播放

我记得backup/pre-cleanup似乎有一些修复,请尽量参照着实现,没有就自己整</issue_description>

Comments on the Issue (you are @copilot in this section)


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Copilot AI self-assigned this Dec 14, 2025
Copilot AI and others added 3 commits December 14, 2025 13:54
Co-authored-by: UcnacDx2 <127503808+UcnacDx2@users.noreply.github.com>
Co-authored-by: UcnacDx2 <127503808+UcnacDx2@users.noreply.github.com>
Co-authored-by: UcnacDx2 <127503808+UcnacDx2@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix video streaming mid and history mid discrepancies Fix history resume playback when video streaming account differs from history account Dec 14, 2025
Copilot AI requested a review from UcnacDx2 December 14, 2025 14:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fix

2 participants

Comments