Extend mythutil to support sending multi-line events.

Use extra --event arguments to add more lines to the event.
Add duplicate checking and limited matching optimizations and other
scheduler related changes.

The three major changes are as follows.

Split the checks against the oldrecorded and recorded tables for
previous recordings away from the "place" phase of scheduling and call
it the "check" phase.  This makes it easier to report how much time is
spent doing this and leads to the next major change.

Drastically reduce the number of checks against the oldrecorded and
recorded tables for previous recordings.  Historically, this has been
the most significant contributor to long scheduler runs.  Not every
unnecessary check is eliminated, but the vast majority of them are.
Trying to remove the few remaining ones would probably take longer
than simply rechecking them.

Allow for checking a subset of the program table when new guide data
is available.  This is primarily aimed at EIT scanning where typically
only a few hours of guide data for specific channels is updated in an
orderly fashion.  Not rechecking the unchanged guide data greatly
reduces the amount of work the scheduler has to do.  Please note the
EIT scanner has not been updated yet to take advantage of this change.

The other changes are as follows.

Use more expressive reschedule requests.  This is primarily to support
the changes listed above.  It also makes it easier to understand why
reschedules occurred when reading the logs and might lead to the
elimination of unnecessary reschedules in the future.

  MATCH reschedule requests should be used when the guide data or a
  specific recording rule is changed.  The syntax is as follows.

  RESCHEDULE_RECORDINGS
  MATCH <recordid> <sourceid> <mplexid> <maxstarttime> <reason>

  maxstarttime should be in ISO format.  If recordid, sourceid or
  mplexid are non-zero or maxstarttime is a valid time, the scheduler
  will restrict itself to recording rules and guide data matching
  those parameters.  reason is purely for purposes of logging.

  CHECK reschedule requests should be used when the status of a
  specific episode is affected such as when "never record" or "allow
  re-record" are selected or a recording finishes or is deleted.  The
  syntax is as follows.

  RESCHEDULE_RECORDINGS
  CHECK <recstatus> <recordid> <findid> <reason>
  <title>
  <subtitle>
  <description>
  <programid>

  recordid should be the parent recordid, when applicable, otherwise,
  the normal recordid.  Setting programid to '**any**" and title to ""
  is a special case used to emulate an old reschedule request for
  recordid 0.  Setting programid to "**any**" and title to other than
  "" is another special case used when all entries for a title are
  deleted from oldrecorded.  recstatus and reason are purely for
  purposes of logging.

  PLACE reschedule request should be used in all other cases.  The
  syntax is as follows.

  RESCHEDULE_RECORDINGS
  PLACE <reason>

  reason is purely for purposes of logging.

Update the PHP and Python bindings to use the new reschedule requests.
Please note the bindings API has not changed to make full use of the
new requests.  I'm leaving it to the bindings maintainers to decide
how best to do that.

Clear record.duplicate when a recording is queued for deletion.  It
should have been this way all along and avoids a redundant reschedule
when the file is actually unlinked.

Lower the very detailed scheduler placement logging to LOG_DEBUG.
This makes VB_SCHEDULE/LOG_INFO more useful for less voluminous
purposes.

Add findid to the recordmatch table.  This avoids having to calculate
it in multiple places.

Tighten the window for rescheduling long running programs from "24
hours ago" to "~8 hours ago".

Avoid creating unnecessary RecordingInfo objects that are going to get
deleted later anyway.

Fixes #10533
Bump all version numbers from 0.25 to 0.26 - distclean recommended
Updated Finnish MythFrontend and all plugins translation
from Ilkka Tengvall.

Thank you Ilkka!

Refs #10577

Signed-off-by: Nicolas Riendeau <nriendeau@mythtv.org>
Merge branch 'master' of code.mythtv.org:mythtv
Update the Spanish translation.

Refs #10575.

Signed-off-by: Kenni Lund <kenni@mythtv.org>
Fixes #10566.  Reverts part of 3a51b833e to improve channel changes.

The first half of 3a51b833e looks like a bug (the new condition means
the following "else if" branch is never taken).  Removing it stops
guide-based channel changes from being forced onto a different tuner.

Note: this fix exposes another problem with guide-based channel
changes - you can't switch to a different tuner in the current input
group.  Fix is in progress.
Tweak logging around Commercial Skip -> Cutlist copying
Subtitles: Remove the Prefer708Captions setting.

CEA-708 closed captions are now in very good shape, so there is no
particular reason to favor the "legacy" CEA-608 captions.
Clean up a bunch of mythmusic compile warnings
Re-enable idle timer after exiting video playback. (Copy/paste error). Fixes #10582

Signed-off-by: Stuart Morgan <smorgan@mythtv.org>
RingBuffer: Set the oldfile flag only once per live TV segment.

Refs #10490.
Network control: add "jump pbb" as a short alias for "jump playbackbox".
Revert "Updated Finnish MythFrontend and all plugins translation"

This reverts commit daf67b12735f88e4f463664d3307a9283404dad1.
Simplify the set-bookmark-at-playback-exit logic.  Refs #7994
Updated Finnish MythFrontend and all plugins translation
from Ilkka Tengvall

Thank you!

Refs #10577

Signed-off-by: Nicolas Riendeau <nriendeau@mythtv.org>
Merge branch 'master' of code.mythtv.org: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.
Add functions for converting between pre- and post-cutlist frame numbers.

Refs #8631.  These functions are not actually used anywhere yet.
Declare pre/post cutlist translation functions as const.