Modify
Warning Please read the Ticket HowTo before creating or commenting on a ticket. Failure to do so may cause your ticket to be rejected or result in a slower response.

Opened 4 years ago

Closed 2 years ago

Last modified 4 months ago

#7994 closed Developer Task (Fixed)

Clear the bookmark at the end of playback

Reported by: Jim Stichnoth <stichnot@…> Owned by: stichnot
Priority: minor Milestone: 0.26
Component: MythTV - General Version: Master Head
Severity: medium Keywords:
Cc: Ticket locked: no

Description

When exiting playback, normally the bookmark is set. However, if playback exits near the end of the recording/video, the bookmark is not set, causing inconsistent behavior next time the recording/video is played. This is because when exiting in the middle of the program, it always resumes from the same point, but when exiting at the end, the resume point depends on whether a bookmark was previously set.

It would be more consistent to always clear the bookmark when playback exits near the end. This patch does that.

Attachments (11)

clear_bookmark_at_end.patch (2.6 KB) - added by Jim Stichnoth <stichnot@…> 4 years ago.
clear_bookmark_at_end_2.patch (6.3 KB) - added by Jim Stichnoth <stichnot@…> 4 years ago.
Use this instead of clear_bookmark_at_end.patch
clear_bookmark_at_end_3.patch (6.3 KB) - added by Jim Stichnoth <stichnot@…> 4 years ago.
clear_bookmark_at_end_4.patch (6.4 KB) - added by Jim Stichnoth <stichnot@…> 4 years ago.
clear_bookmark_at_end_5.patch (6.6 KB) - added by Jim Stichnoth <stichnot@…> 4 years ago.
clear_bookmark_at_end_6.patch (5.5 KB) - added by Jim Stichnoth <stichnot@…> 4 years ago.
clear_bookmark_at_end_8.patch (5.5 KB) - added by Jim Stichnoth <stichnot@…> 4 years ago.
clear_bookmark_at_end_10.patch (6.0 KB) - added by Jim Stichnoth <stichnot@…> 3 years ago.
clear_bookmark_at_end_11.patch (5.8 KB) - added by Jim Stichnoth <stichnot@…> 3 years ago.
clear_bookmark_at_end_14.patch (6.6 KB) - added by Jim Stichnoth <stichnot@…> 3 years ago.
Adds the logic regarding "realTotalFrames" to IsNearEnd?(). This is probably worthy of a separate bug report, but it's hard to see the impact without this whole patch.
clear_bookmark_at_end_15.patch (6.6 KB) - added by stichnot 2 years ago.
Updated to latest master.

Download all attachments as: .zip

Change History (27)

Changed 4 years ago by Jim Stichnoth <stichnot@…>

Changed 4 years ago by Jim Stichnoth <stichnot@…>

Use this instead of clear_bookmark_at_end.patch

comment:1 Changed 4 years ago by Jim Stichnoth <stichnot@…>

I was reminded of the frontend setting that controls whether bookmarks are saved on exit: either always, never, or after a prompt. We shouldn't mess with bookmarks unless that setting is "always". The new patch fixes this, and also tries to clean up the bookmark handling for all the calls to TV::PrepareToExitPlayer?().

Changed 4 years ago by Jim Stichnoth <stichnot@…>

comment:2 Changed 4 years ago by Jim Stichnoth <stichnot@…>

Updated patch against a recent version of trunk.

Changed 4 years ago by Jim Stichnoth <stichnot@…>

comment:3 Changed 4 years ago by Jim Stichnoth <stichnot@…>

Updated to clear_bookmark_at_end_4.patch after the ProgramInfo? refactoring.

Changed 4 years ago by Jim Stichnoth <stichnot@…>

comment:4 Changed 4 years ago by Jim Stichnoth <stichnot@…>

Updated to clear_bookmark_at_end_5.patch to fix a minor problem. I have some .mkv files under MythVideo? for which IsNearEnd?() finds that framesRead > totalFrames, which causes the wrong result to be returned.

comment:5 Changed 4 years ago by Jim Stichnoth <stichnot@…>

Note that clear_bookmark_at_end_5.patch is a combination of clear_bookmark_at_end_4.patch and the patch from #8527.

Changed 4 years ago by Jim Stichnoth <stichnot@…>

comment:6 Changed 4 years ago by Jim Stichnoth <stichnot@…>

Updated to clear_bookmark_at_end_6.patch after the libmythui-osd branch merge. The patch from #8527 is also needed to make this work properly for videos (as opposed to recordings).

Changed 4 years ago by Jim Stichnoth <stichnot@…>

comment:7 Changed 4 years ago by Jim Stichnoth <stichnot@…>

Updated to version 8 (must have forgotten to upload version 7) after various trunk updates, notably the NVP renaming.

comment:8 Changed 4 years ago by robertm

  • Owner changed from ijr to mdean
  • Status changed from new to assigned

Changed 3 years ago by Jim Stichnoth <stichnot@…>

Changed 3 years ago by Jim Stichnoth <stichnot@…>

Changed 3 years ago by Jim Stichnoth <stichnot@…>

Adds the logic regarding "realTotalFrames" to IsNearEnd?(). This is probably worthy of a separate bug report, but it's hard to see the impact without this whole patch.

comment:9 Changed 2 years ago by wagnerrp

  • Owner changed from mdean to stichnot
  • Type changed from patch to Developer Task

Changed 2 years ago by stichnot

Updated to latest master.

comment:10 Changed 2 years ago by stichnot

  • Milestone changed from unknown to 0.26
  • Version changed from unknown to Master Head

comment:11 Changed 2 years ago by Jim Stichnoth <jstichnoth@…>

In 6d2dce1d99c945db7f315936a3a37ae0fb9e8037/mythtv:

Simplify the set-bookmark-at-playback-exit logic. Refs #7994

comment:12 Changed 2 years ago by Jim Stichnoth <jstichnoth@…>

In 6114ecd0b726950364c644afb2230afe8963b424/mythtv:

Fixes #7994. Clears the bookmark in some cases when exiting playback.

If the user has PlaybackExitPrompt? set to 2 ("Save position and
exit"), then the bookmark should be set any time playback exits, even
at the natural end of playback. In this case, any existing bookmark
is explicitly cleared, since a bookmark at the end of a recording is
essentially equivalent to a bookmark at the very beginning of the
recording which is equivalent to no bookmark at all.

comment:13 Changed 2 years ago by stichnot

  • Resolution set to Fixed
  • Status changed from assigned to closed

comment:14 Changed 4 months ago by Jim Stichnoth <jstichnoth@…>

In 670cb2d55c36f57ca056babccef1d99ae4c4bad0/mythtv:

Be less aggressive about clearing the bookmark on exit.

Refs #7994. We shouldn't automatically clear the bookmark at the end
of the recording if the "Clear bookmark on playback" setting is false.

comment:15 Changed 4 months ago by Jim Stichnoth <jstichnoth@…>

In 525ac31dd2215e5ce46fc3b70f7ba883d99b736a/mythtv:

Be less aggressive about clearing the bookmark on exit.

Refs #7994. We shouldn't automatically clear the bookmark at the end
of the recording if the "Clear bookmark on playback" setting is false.
(cherry picked from commit 670cb2d55c36f57ca056babccef1d99ae4c4bad0)

Conflicts:

mythtv/libs/libmythtv/tv_play.cpp

comment:16 Changed 4 months ago by Jim Stichnoth <jstichnoth@…>

In 3f328b6955a462ed111bb05fbb2e4f4cc5a79005/mythtv:

Be less aggressive about clearing the bookmark on exit.

Refs #7994. We shouldn't automatically clear the bookmark at the end
of the recording if the "Clear bookmark on playback" setting is false.
(cherry picked from commit 670cb2d55c36f57ca056babccef1d99ae4c4bad0)

Conflicts:

mythtv/libs/libmythtv/tv_play.cpp

(cherry picked from commit 525ac31dd2215e5ce46fc3b70f7ba883d99b736a)

Add Comment

Modify Ticket

Action
as closed .
The resolution will be deleted. Next status will be 'new'.
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.