Opened 14 years ago

Closed 12 years ago

Last modified 10 years ago

#7994 closed Developer Task (Fixed)

Clear the bookmark at the end of playback

Reported by: Jim Stichnoth <stichnot@…> Owned by: Jim Stichnoth
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@…> 14 years ago.
clear_bookmark_at_end_2.patch (6.3 KB) - added by Jim Stichnoth <stichnot@…> 14 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@…> 14 years ago.
clear_bookmark_at_end_4.patch (6.4 KB) - added by Jim Stichnoth <stichnot@…> 14 years ago.
clear_bookmark_at_end_5.patch (6.6 KB) - added by Jim Stichnoth <stichnot@…> 14 years ago.
clear_bookmark_at_end_6.patch (5.5 KB) - added by Jim Stichnoth <stichnot@…> 14 years ago.
clear_bookmark_at_end_8.patch (5.5 KB) - added by Jim Stichnoth <stichnot@…> 14 years ago.
clear_bookmark_at_end_10.patch (6.0 KB) - added by Jim Stichnoth <stichnot@…> 13 years ago.
clear_bookmark_at_end_11.patch (5.8 KB) - added by Jim Stichnoth <stichnot@…> 13 years ago.
clear_bookmark_at_end_14.patch (6.6 KB) - added by Jim Stichnoth <stichnot@…> 13 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 Jim Stichnoth 12 years ago.
Updated to latest master.

Download all attachments as: .zip

Change History (27)

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

Attachment: clear_bookmark_at_end.patch added

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

Use this instead of clear_bookmark_at_end.patch

comment:1 Changed 14 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 14 years ago by Jim Stichnoth <stichnot@…>

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

Updated patch against a recent version of trunk.

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

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

Updated to clear_bookmark_at_end_4.patch after the ProgramInfo? refactoring.

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

comment:4 Changed 14 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 14 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 14 years ago by Jim Stichnoth <stichnot@…>

comment:6 Changed 14 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 14 years ago by Jim Stichnoth <stichnot@…>

comment:7 Changed 14 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 14 years ago by robertm

Owner: changed from Isaac Richards to sphery
Status: newassigned

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

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

Changed 13 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 12 years ago by Raymond Wagner

Owner: changed from sphery to Jim Stichnoth
Type: patchDeveloper Task

Changed 12 years ago by Jim Stichnoth

Updated to latest master.

comment:10 Changed 12 years ago by Jim Stichnoth

Milestone: unknown0.26
Version: unknownMaster Head

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

In 6d2dce1d99c945db7f315936a3a37ae0fb9e8037/mythtv:

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

comment:12 Changed 12 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 12 years ago by Jim Stichnoth

Resolution: Fixed
Status: assignedclosed

comment:14 Changed 10 years 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 10 years 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 10 years 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)

Note: See TracTickets for help on using tickets.