commit 512d723c8374ee3cf5a1b63ce5290a71dc3beee9
Author: Patrick J. Maloney <120519414+PatrickJMaloney@users.noreply.github.com>
Date:   Sat Jan 13 09:12:00 2024 -0500

    Fix update of older MythTV databases   (#844)
    
    * Add method CheckTableColumnExists which checks for existence of a column in a database table.
    
    * Execute some blocks of SQL earlier in the migration process to allow older database versions to migrate properly.
    
    * Changes per PR #844 code review.
    
    * Add requested comments.

commit d39a7bcaecc9380df421596ef00fae5e80e61d7e
Author: Klaas de Waal <klaas@kldo.nl>
Date:   Wed Jan 10 20:39:52 2024 +0100

    Reapply "DB Schema Update: Change lambda capture from 'by value' to 'by reference'"
    
    This reverts commit 4aa5068e237c914ae2cc0c95556553328274156a.

commit 376b86e02ad8f6e0a99f5ffc5d0e277e49868da4
Author: Klaas de Waal <klaas@kldo.nl>
Date:   Wed Jan 10 20:38:53 2024 +0100

    Revert "Reorder structure changes to allow older MythTV databases to migrate cleanly."
    
    This reverts commit 0133097c8e593849b78954829a015a52dabedacf.

commit 4aa5068e237c914ae2cc0c95556553328274156a
Author: Klaas de Waal <klaas@kldo.nl>
Date:   Wed Jan 10 20:34:45 2024 +0100

    Revert "DB Schema Update: Change lambda capture from 'by value' to 'by reference'"
    
    The reordering likely introduces more problems that it fixes.
    More investigation is needed.
    
    This reverts commit 6b442547f2746b01f51a051438b4d02db9441b36.

commit ede6fe3ce29d62a383eb83385bb88e71f1a5da9b
Merge: 6b442547f2 0133097c8e
Author: kmdewaal <kdewaal@mythtv.org>
Date:   Wed Jan 10 18:09:34 2024 +0100

    Merge pull request #842 from PatrickJMaloney/fixes/33
    
    Reorder structure changes to allow older MythTV databases to migrate cleanly.

commit 0133097c8e593849b78954829a015a52dabedacf
Author: Patrick J. Maloney <patrick_maloney@hotmail.com>
Date:   Wed Jan 10 11:05:02 2024 -0500

    Reorder structure changes to allow older MythTV databases to migrate cleanly.

commit 6b442547f2746b01f51a051438b4d02db9441b36
Author: Patrick J. Maloney <patrick@patrickjmaloneyllc.com>
Date:   Mon Jan 1 17:33:27 2024 +0100

    DB Schema Update: Change lambda capture from 'by value' to 'by reference'
    
    This fix corrects a program abort when updating from db version 1302 to 1303.
    The problem is that the 'ORDER BY' column name is not specified, causing a
    fatal SQL error. The column name should be either 'starttime' or '-starttime'
    depending on your time zone.
    
    This occurs because the lambda capture is 'by value' and takes on the value
    at the time it was created (which is empty). Further updates to the local
    variable are not available to the lambda expression.
    
    Switching the lambda capture to 'by reference' resolves this issue.
    
    Signed-off-by: Klaas de Waal <klaas@kldo.nl>
    (cherry picked from commit 7ec562f39820b92c672d430058d2c81cf4844bbd)
    Signed-off-by: Klaas de Waal <klaas@kldo.nl>

commit 4112015bfe6990b8e72cbba7074ba067132e5aff
Author: John Hoyt <john.hoyt@gmail.com>
Date:   Thu Oct 26 18:39:18 2023 -0400

    OSX: Fix FFMPEG Xcode15 linker issue
    
    With the introduction of Xcode 15, Apple has moved to a new linker and
    introduced the "-ld_classic" linker flag as a work around. Without this
    flag, FFMPEG fails to compile on systems with Xcode 15 (i.e. Sonoma).
    
    This workaround may need to be removed at the next FFMPEG sync or when
    Apple deprecates the flag.
    
    (cherry picked from commit 26b4a11a4cb22b1d6cb6efc75ff08f08c4b7ad04)

commit 26e76a3949ed580cb2da32cc3416ab28dafaa328
Author: Jan Hambrecht <jaham@gmx.net>
Date:   Sat Mar 18 23:34:30 2023 +0100

    Fix translation of schedule filter entries
    
    This commit uses 'QCoreApplication::translate' to translate the entries
    of the schedule filter list as this allows to pass a translation context
    which is needed to find the translations of these entries.
    
    (cherry picked from commit c37aaa54be378009b67c289540bb3d7c6081fcdc)

commit 1aab62a991b8fdc2f9b47eb6de913a81fdd71e25
Author: DFDario <ddafre@gmail.com>
Date:   Wed Jul 19 17:40:48 2023 +0200

    Update mythfrontend_it.ts
    
    Deeply wrong translation that needs to be revised to avoid
    misunderstanding. Sindacato in Italian is a Labor or Trade Union hence
    this has less to do with an episode number. The best translation I
    have found is "accorpato" (joined).
    
    (cherry picked from commit 07439138c378fe07efcee8993721d7e3932ed4c6)

commit b62994091261163d015967d063cdf83287bb8ed1
Author: DFDario <ddafre@gmail.com>
Date:   Wed Jun 21 12:34:03 2023 +0200

    Updated italian translation
    
    Some few changes since my last update.
    
    (cherry picked from commit 94675df18f99cab4fa2b10b9635832d33c6a8c84)

commit 2fb66bccb00b2a0436e7f24884bacd426393a7b6
Author: Britney Fransen <brfransen@gmail.com>
Date:   Wed Aug 30 00:21:11 2023 -0400

    Updated American English translation.
    
    Fixes #732.
    
    (cherry picked from commit 425b8795c89327e114ec70fe5beb1d0642ad8248)

commit 21d2d9d951a0ce63303e7632a203e5268c9531a4
Author: Klaas de Waal <klaas@kldo.nl>
Date:   Sun Aug 13 19:34:27 2023 +0200

    Skip SeekReset before scanning streams again
    
    In StreamChangeCheck, skip SeekReset before ScanStreams is called.
    The SeekReset discards processed video frames and input buffers and this causes a part
    of the video not being played plus a video freeze of about half a second.
    It looks like this code is only called when there is a change in the streams after a new PMT
    has been received and this happens only incidentally with streams from Finnish broadacaster YLE.
    Skipping the SeekReset gives smooth playback on the YLE streams when there is a stream change.
    A call to StreamChangeCheck can also be initiated from FFmpeg from libavformat/mpeg.c but I have not
    been able to find a recording or a video other than the YLE recordings that does trigger this.
    There is now a log message if the skip does happens just in case this might cause a regression.
    For more details see commit 4c49293a5b8a531603a348fccbf90816c9d939cb.
    
    (cherry picked from commit 826aa7525755e7af81444792e1c21e1748bab535)

commit cb0e08dd9ce97e0cca08f71e2346d3d4d27d991f
Author: Klaas de Waal <klaas@kldo.nl>
Date:   Sun Aug 13 14:52:09 2023 +0200

    Scan streams again after PMT change
    
    When there is a change detected in the number of streams or in the type of streams after a new
    PMT has been received then scan the streams again.
    It is possible that the streams change during a recording. For instance, a commercial can have one
    audio stream and then in the following program there can be an audio stream added.
    This is what the Finnish broadcaster YLE is doing. It is completely standards-conforming but
    it is as far as I am aware the only broadcaster that does this.
    The original FFmpeg demuxer looks only at the streams as present in the beginning of the recording
    and therefore it does not detect changes later in the recording.
    Detecting stream changes while a recording is playing is a MythTV extension and it requires changes
    to FFmpeg. This is one reason why there is a copy of FFmpeg included as part of MythTV, instead of
    using the standard FFmpeg libraries that are part of the Linux system.
    Initially the streams_changed callback was needed for correct video playback of YLE streams; see
    commit ebeea33 from 2021. This did fix the problem of the screen sometimes showing only a 640x480 part
    of the 1920x1080 area.
    There has been a significant rewrite of the MythTV changes in file mpegts-mythtv.c in 2022 and one
    result is that the video playback of YLE streams is now correct without rescanning the streams.
    However, there is still the problem of audio stream changes not being picked up.
    In commit ad9fb22 from 2022 it is mentioned that:
    "The streams_changed callback has been disabled as it is now unnecessary
    in my samples from the Finnish YLE that used to trigger it.  It could
    be re-enabled if necessary."
    As it appears to be still necessary this commit does exactly that.
    Note that when the streams_changed callback is called there is a pause of about one second,
    caused by the SeekReset that is done before the ScanStreams. It is possible that the SeekReset
    can be omitted.
    
    (cherry picked from commit 4c49293a5b8a531603a348fccbf90816c9d939cb)

commit 9572dc5a124b46ac60c6cea34994ccc69ec53442
Author: David Engel <dengel@mythtv.org>
Date:   Thu Jul 27 20:49:56 2023 -0500

    Fix FFmpeg compilation with binutils >= 2.41.
    
    This is from FFmpeg commit effadce6c756247ea8bae32dc13bb3e6f464f0eb .
    
        Author: Rémi Denis-Courmont <remi@remlab.net>
        Date:   Sun Jul 16 18:18:02 2023 +0300
    
        avcodec/x86/mathops: clip constants used with shift instructions within inline assembly
    
        Fixes assembling with binutil as >= 2.41
    
        Signed-off-by: James Almer <jamrial@gmail.com>
    
    Refs #765
    
    (cherry picked from commit f9f9bba62ee2743c816cb2b9634b6b4397e5e2e3)

commit 402c6d7758d02733e0b4c76a80df862c977e3307
Author: David Hampton <mythtv@love2code.net>
Date:   Fri Jul 21 00:59:43 2023 -0400

    Work around Linux kernel header 6.5 using C++ reserved keyword.
    
    Starting with kernel 6.5.0, a rewrite of the linux/ioprio.h header
    file uses the C++ reserved keyword "class" as a variable name.
    Fortunately we can redefine the string "class" for the duration of the
    inclusion without any ill effects.
    
    Fixes #778.
    
    (cherry picked from commit 7d6c7d605f87b697c7488d1eb4a3246b83e31f01)

commit beaf2bacbe63da92da49e37807efa1738e1fa5c1
Author: MmAaXx500 <viktor.balogh45@gmail.com>
Date:   Thu Jul 6 17:58:46 2023 +0200

    Fix heap-use-after-free in TVRec with Live TV
    
    When playing Live TV continuously on the same channel, there is
    a moment when according to the guide one program ends and the next
    program begins. At this moment the Live TV recording is stopped and
    a new recording is started. There is small time period in between
    in which there is no valid program info and an update of the program
    info from another thread in that period results then in access
    of already deleted program info instance.
    Fixed by using the m_stateChangeLock to lock the complete sequence.
    
    Refs #768
    Refs #769
    
    Signed-off-by: Klaas de Waal <klaas@kldo.nl>

commit 83e1df82c2094586a585b8d5cde9de14e9be0735
Author: Klaas de Waal <klaas@kldo.nl>
Date:   Thu May 18 21:00:28 2023 +0200

    Fix mythbackend segfault after failed Live TV
    
    A failing Live TV can cause a segfault of mythbackend
    due to a delete of an already deleted object.
    This is not immediately obvious due to pointer
    aliasing but valgrind figures it out anyway.
    
    (cherry picked from commit 68b368673704f35072dbc3fb44e0c8444d737963)
    Signed-off-by: Klaas de Waal <klaas@kldo.nl>

commit c4b7e4c43321154bf5eaa67af02b7ba7ea6bffb8
Author: Bill Meek <bmeek@mythtv.org>
Date:   Sun Apr 16 23:59:37 2023 -0500

    mythdbcon: force QMetaType::QDateTime values to use MythDate::kDatabase
    
    This cares for a recent ibqt5sql5-mysql update in at least one
    distribution where it isn't removing timezone information from
    a query causing it to fail.
    
    Log example without patch:
    MSqlQuery::exec(DBManager16) UPDATE recorded SET recgroup = 'Deleted', recgroupid = 3 WHERE chanid = '10901' AND starttime = '2023-04-08T05:00:00.000Z' ; <<<< Took 0ms
    
    Log example with patch:
    MSqlQuery::exec(DBManager1) UPDATE recorded SET recgroup = 'Deleted', recgroupid = 3 WHERE chanid = '10901' AND starttime = '2023-04-07 05:30:00' ; <<<< Took 0ms
    
    Results seen by users on the Forum and mailing list.
    
    Credits to Mark, Roland and Klaas.
    
    See: https://forum.mythtv.org/viewtopic.php?p=25833#p25833
    
    The Debian solution is due 4/31/2023.
    
    (cherry picked from commit d889da2b0ebdbbfaa59051ae30a6b5b9a5930cdb)

commit 51cb10a67855bae82a97ca1995956622b0902021
Author: Bill Meek <bmeek@mythtv.org>
Date:   Mon Apr 10 10:45:38 2023 -0500

    ApplyRecordRecGroupChange: replace chanid/starttime with recordedid
    
    Solves issue here: https://forum.mythtv.org/viewtopic.php?p=25852#p25852

commit 0682d4d42dd50ad8592c522fe39fc8a81a11ee59
Author: Jan Hambrecht <jaham@gmx.net>
Date:   Sun Mar 19 16:26:15 2023 +0100

    Cleanup function 'DetectDevice'
    
    Remove dead code which is not going to be used anymore
    
    (cherry picked from commit 80b4911f15324440fbd04c3580922463f87a2ae1)

commit 44b1ac1d59aff9b9e4340e9a693a0e7a2b3e0799
Author: Jan Hambrecht <jaham@gmx.net>
Date:   Sun Mar 19 16:20:43 2023 +0100

    Remove checking 'ReadOnly' drive property
    
    When checking if a drive is an optical drive, rely only on the
    'MediaCompatibility' property and not the 'ReadOnly' property
    of the 'org.freedesktop.UDisks2.Drive' interface.
    
    (cherry picked from commit 9957ffab6c452c373bc60a1b9b9c3a3212d4f8f0)

commit f2a964ed814a08d8a3016e5b0b1f0979e4586360
Author: Jan Hambrecht <jaham@gmx.net>
Date:   Sat Mar 18 23:16:08 2023 +0100

    Fix detection of optical drives
    
    Checking for mount points is not reliable to determine if a block device
    is an optical drive. This commit uses the 'MediaCompatibility' property
    of the 'org.freedesktop.UDisks2.Drive' DBUS interface to check if the
    drive supports optical media.
    Also changes the function name in the log messages to match the function
    they are called from.
    
    (cherry picked from commit 998669de6114706d0459214ecc030aed7489afab)

commit 142a8e070841c74d200e3444f6b815cde5452809
Author: Klaas de Waal <klaas@kldo.nl>
Date:   Sun Mar 26 14:29:59 2023 +0200

    End-of-file in MythMusic
    
    Detect end-of-file when reading music files and return the AVERROR_EOF status to FFmpeg.
    In version 33 MythTV has upgraded to a version of FFmpeg that does require this.
    
    Refs #686
    
    (cherry picked from commit b9354c9f9e5672655a87078c15d6cda77702d89e)

commit b391cfb6a7ac87d245f697edb77c0114d67de683
Author: Klaas de Waal <klaas@kldo.nl>
Date:   Fri Mar 17 23:01:07 2023 +0100

    Conversion of negative time values to string
    
    When converting a negative time value with format string "m:ss" there is
    a minus sign before the minutes and also a minus sign before the seconds.
    The implementation apparently only supports positive time interval values.
    The implementation is now extended to support negative time interval values
    by converting the absolute time value to string and then prepending a minus
    sign when the time value is negative.
    The implementation was introduced in commit 65b9c73adacabe38877c3e18af5d4a0545799c1
    "Better fix for MythDate::formatTime to handle overflows.", committed on Mar 16, 2022.
    
    Refs #733
    
    (cherry picked from commit c166849536ca2785184b5b6a20aec6bfd3b7a099)

commit 7f288be61b5fa653b5afd35b0ceea3b524ae8a1c
Author: Klaas de Waal <klaas@kldo.nl>
Date:   Sun Mar 12 20:54:07 2023 +0100

    mythtv-setup hanging at Video Sources
    
    On Ubuntu 22.10 mythtv-setup hangs in Video Sources when creating a new Video source.
    The problem has been traced to running tv_find_grabbers by MythSystemLegacy.
    The fix consists of adding the kMSDontDisableDrawing flag to the invocation of MythSystemLegacy.
    It is not clear why this problem only appears on Ubuntu 22.10 and not on other distro's.
    
    Refs #690
    
    (cherry picked from commit 337500ecae712b48a2956bae5d786d6e90e4c667)

commit c273ed0f9a2491b7f6ec377be0a0a861f7788849
Author: jhoyt4 <john.hoyt@gmail.com>
Date:   Sat Feb 18 09:42:47 2023 -0500

    OSX: Handle constants deprecated for 11.7
    
      - Fixes regression caused by deprecation of constants by Apple
        in 11.5.7.
      - Initial fix for macOS 12 introduced in commit 3787583
    
    (cherry picked from commit df7903b418da240e0ed5ea9bcb981a921ff4e8de)

commit a803b198a84e04aa9a83dee5047193e431e9b3ed
Author: Klaas de Waal <klaas@kldo.nl>
Date:   Thu Feb 9 21:44:34 2023 +0100

    Send REC_PENDING event before recording starts
    
    Fix the logic that sends the REC_PENDING event.
    - REC_PENDING event is sent always before the REC_STARTED.
    - REC_PENDING event is sent at 120, 90, 60 and 30 seconds before the start of the recording.
    - Start of the recording is the scheduled program start time plus the RecordPreRoll setting value.
    - When a recording is scheduled to start recording immediately then there is
      one REC_PENDING event with 0 seconds immediately followed by the REC_STARTED event.
    - The setting WakeUpThreshold specifies how early the slave backends are signaled to start
      before the recording is started. This setting is used as configured, but now with a minimum
      value of RecordPreRoll plus 120 seconds so that there is always time for the REC_PENDING events.
    
    (cherry picked from commit 55a7d8293004b0cadb921a383b44a0fb9954a287)

commit 0c373c3b98e2cf8426457ff75be2935ec6f53248
Author: Mark Spieth <mspieth@digivation.com.au>
Date:   Sat Feb 11 13:48:57 2023 +1100

    Android: OpenSSL 1.1.1 load system CA certificates explicitly
    Issue: 125
    
    * Move all android library dependencies to the packaging repo

commit 3db72cc1d34609a1e07ec44b0d999c673501963c
Author: David Hampton <mythtv@love2code.net>
Date:   Mon Feb 6 22:53:49 2023 -0500

    Arch linux refuses to accept egrep. Switch to 'grep -E'.
    
    (cherry picked from commit bbcc7db3fdcd338af1889c8226c933cc7172715d)
