[mythtv-commits] Ticket #11119: Viewing Live TV Causes Recordings to be Moved to Live TV Group
MythTV
noreply at mythtv.org
Fri Apr 11 00:21:10 UTC 2014
#11119: Viewing Live TV Causes Recordings to be Moved to Live TV Group
----------------------------------+-----------------------------
Reporter: scott.harris0509@… | Owner: danielk
Type: Bug Report - General | Status: assigned
Priority: minor | Milestone: unknown
Component: MythTV - General | Version: Master Head
Severity: medium | Resolution:
Keywords: | Ticket locked: 0
----------------------------------+-----------------------------
Comment (by Frank Phillips <fphillips81@…>):
Since no one has explicitly stated it, I wanted to mention that this issue
causes users to lose recordings if they don't notice in time. I think that
warrants it a more serious priority. My analysis of the problem follows.
Following #10943, an `ApplyRecordRecGroupChange()` was added near the end
of `GetProgramRingBufferForLiveTV()` to update recorded.recgroup before it
is queried in `StartedRecording()`.
The problem arises because we don't have the correct recstartts for
`ApplyRecordRecGroupChange()` until later when we successfully insert the
program in `RecordingInfo::StartedRecording`.
In this example, we updated the recgroup for 20140329233000 instead of
20140329233001
{{{
2014-03-29 18:30:00.873242 D [15834/15852] TVRecEvent mythdbcon.cpp:689
(exec) - MSqlQuery::exec(DBManager4) UPDATE recorded SET recgroup =
'LiveTV' WHERE chanid = '1361' AND starttime = '2014-03-29T23:30:00Z'
}}}
{{{
+----------+--------------+----------+-------------------------+
| recgroup | storagegroup | recordid | basename |
+----------+--------------+----------+-------------------------+
| LiveTV | Default | 978 | 1361_20140329233000.mpg |
| LiveTV | LiveTV | 978 | 1361_20140329233001.mpg |
+----------+--------------+----------+-------------------------+
}}}
By the time we get to the query in `StartedRecording()`, we have the
correct recstartts.
{{{
2014-03-29 18:30:00.886798 D [15834/15852] TVRecEvent mythdbcon.cpp:689
(exec) - MSqlQuery::exec(DBManager4) SELECT recgroup FROM recorded WHERE
chanid = '1361' AND starttime = '2014-03-29T23:30:01Z'
}}}
My patch changes the query to `GetRecordingGroup()` so we don't need to
update the DB beforehand and we can use `SetRecordingGroup()` instead.
This avoids the incorrect recstartts issue.
{{{
+----------+--------------+----------+-------------------------+
| recgroup | storagegroup | recordid | basename |
+----------+--------------+----------+-------------------------+
| Default | Default | 982 | 1541_20140407050000.mpg |
| LiveTV | LiveTV | 982 | 1541_20140407050001.mpg |
+----------+--------------+----------+-------------------------+
}}}
I've run this patch for the last week with no regressions that I can see.
All recgroups are set appropriately.
Regarding the patch in comment 9, and no disrespect to its author, I think
it treats the symptom rather than the cause.
For master:
https://github.com/fphillips/mythtv/commit/e6ca74c1a497bd82ca62aa74738d4543043d8656
--
Ticket URL: <https://code.mythtv.org/trac/ticket/11119#comment:15>
MythTV <http://www.mythtv.org>
MythTV Media Center
More information about the mythtv-commits
mailing list