[mythtv-commits] Ticket #12809: Use lastPlayPos rather than bookmark
MythTV
noreply at mythtv.org
Sat Jun 11 14:08:36 UTC 2016
#12809: Use lastPlayPos rather than bookmark
-----------------------------------------+-------------------------
Reporter: rsiddons | Owner: rsiddons
Type: Patch - Feature | Status: new
Priority: minor | Milestone: unknown
Component: MythTV - Video Playback | Version: Master Head
Severity: low | Keywords:
Ticket locked: 0 |
-----------------------------------------+-------------------------
This patch offers a solution to
https://forum.mythtv.org/viewtopic.php?f=9&t=163 '"Recently watched"
recordings playback filter'
requesting a way of locating part-played recordings more easily.
It involves the last-played position introduced by #11713 and Watchlist
changes from #12296.
Most importantly, it alters bookmarking behaviour to separate last-play
position from 'user marks'.
As the changes are connected, they are presented together - 18 commits
have been aggregated into 2 mega-patches for convenience, but I can easily
push a branch if it helps.
== Summary: ==
1. Last-played position is re-enabled and becomes exclusive indicator of
playback position. Video Library and the preview generator also use it.
2. Bookmarks become a user feature only and are never set/cleared
automatically. 2 related settings are removed.
3. Buttonlist items gain a progressbar widget and progress percentage
value. 'Watch Recordings' uses this to show the playback position;
'Upcoming Recordings' uses it to show a (proxy) recording progress. See
screenshots.
4. The Watchlist promotes part-watched recordings to the top.
5. Introduces a Myth-compatible !QtConcurrent feature for conveniently
running background threads.
These patches are fully revertable. However you will lose the last-played
position of all part-played recordings/videos that were played whilst the
patches were installed (because bookmark won't be set). Manually bookmark
them first before reverting.
== 1. Extend lastPlayPos ==
Last-played position was disabled by 38443b8e (the menu option to resume
playback never appears). It is re-enabled for recordings and videos.
As it duplicates (betters) the bookmark's 'save position on exit'
function, this mark assumes that responsibility and is also updated on
playback exit (provided playback has been going for at least 30 sec). At
end of recording it is reset.
Note: 'Automatically Mark watched' is now also actioned by the end-of-
playback dialog (unnoticed bug: it isn't currently).
By default, playback now starts from:
- last-played position, if present
- bookmark, if present (so user can override program start mark)
- program start mark, if present (recordings only)
- beginning of file
Menu options allow user to start from last-played position, bookmark or
'beginning' (program start mark or file start) where applicable.
Menu options allow user to clear bookmark and reset last-played position.
This mark always indicates playback position (whereas bookmark may not)
and so can be used to identify part-played recordings/videos.
Previews are now generated from:
- last-played position, if present
- bookmark, if present,
- program start mark, if present
- existing offset calculation, which is unchanged.
Possibly the latter two should be combined to 'x minutes from program
start'
== 2. Simplify bookmarks ==
Bookmarks have always been confusing because they try to do (at least) 2
functions:
mark last-played point or mark a user-designated point, i.e. program
start or a point of interest.
This depends on 2 settings "Clear bookmark on playback" & "Action on
playback exit/Save position and exit".
Either the user must remember to manually bookmark before exiting an
unfinished show or forego the ability to mark anything (because Myth will
overwrite it on exit).
By losing the last-play-point responsibility the bookmark becomes purely a
user aid - it will never be automatically updated/cleared.
The 2 settings are now redundant and have been removed from the UI.
An example of the benefit: If my kids have part-watched a show I can
resume playback, bookmark it, then rewind to watch from the beginning,
exiting/resuming as I often as I wish.
When I've finished it (their) next playback will resume from the bookmark
automatically.
Or I could jump-to-bookmark and leave the last-played-pos in its original
location to retain the part-played indication.
Some menu options "Set last-play-pos to bookmark" and "Swap bookmark/last-
play-pos" could prove useful to allow
2 people to part-watch shows simultaneously.
Although not ideal, it's an improvement (until user-assignable bookmarks
get implemented)
== 3. Add UI ==
Buttonlist buttons can now contain a progressbar, as an intuitive way to
show contextual 'progress'.
'Watch Recordings' uses it to show playback posiiton.
Previews aren't regenerated whilst a file is in use, so playback by
another frontend only updates the progress bar/counter, until playback
ceases.
'Upcoming Recordings' uses the bar to show the progress of time for
recordings - it will progress to 100% for failing (0-byte) recordings.
Filesize is also available for 'Upcoming Recordings' now (although
Scheduler Updates will reset it to 0.00 for 10 secs)
A percentage progress value is also provided that can be used for sorting,
or as a "depends" for a 'part-watched' icon.
The modified !MythCenter-Wide theme demonstrates the UI changes (in a
cluttered and ugly way) by using the button background as a progress bar.
Themers can do a better job.
Video Library has no UI indication of progress.
== 4. Show part-played shows ==
Whilst a 'Recently Watched' filter would be useful, it should probably
include more than part-played recordings.
Sorting is of dubious benefit. If there are so many part-played recordings
then the user is unlikely to select one based on playback positiion!
The important point is to list part-played recordings separately. As
dekarl noted, this feature is a better fit for the Watchlist.
An updated version of the Watchlist #12296 promotes part-watched to the
top of the list.
Note that #12287 is useful for switching between the watchlist and 'all
episodes'.
== 5. Convenience thread-runner ==
QtConcurrent::Run is a useful way of running verbiage-free background
threads. I use it often in Myth without problem.
However, strictly it is incompatible with Myth because MThreadPool is not
a subclass of QThreadPool.
I can't find any evidence to justify this, but include a tailored version
of QtConcurrent::Run that uses MThreadPool.
--
Ticket URL: <https://code.mythtv.org/trac/ticket/12809>
MythTV <http://www.mythtv.org>
MythTV Media Center
More information about the mythtv-commits
mailing list