Opened 8 years ago

Closed 8 years ago

#9931 closed Patch - Bug Fix (fixed)

patch: mythmetadatalookup --refresh-all-artwork can update the wrong recording

Reported by: Doug Haber <doug@…> Owned by:
Priority: minor Milestone: 0.25
Component: MythTV - General Version: Master Head
Severity: medium Keywords:
Cc: Ticket locked: no

Description

Hey All,

mythmetatdatalookup --refresh-all-artwork calls "RemoteGetAllScheduledRecordings?(recordingList)" to get a list of recording rules. This list comes back as a list of ProgramInfo? objects even though on the backend it's really RecordingInfo? objects. This doesn't matter much, however, the backend has some logic to set the starttime/endtime to be the current date at midnight if the recording type isn't Single,Don't,Override,Timeslot or Weekly.

So if you're unlucky (like I was) and you have multiple recording rules on channel 123 that aren't one of the above types (e.g. Record All) and you happened to record something today at midnight on the same channel, then when pginfo->SaveInetref?() is called it will overwrite your recording's inetref with the one from the recording rule.

Even if you're not unlucky, it's still making unnecessary DB calls to update the recorded table when it shouldn't since it's inspecting a recording rule and not a recording . The attached patch makes sure that we only make the Save() calls if the programinfo is likely to actually be a program info, that is, it has start & end time that aren't equal.

Thanks!

Doug

Attachments (2)

lookup.diff (2.2 KB) - added by Doug Haber <doug@…> 8 years ago.
recidupd.diff (1.3 KB) - added by robertm 8 years ago.
Update season, episode, inetref using rule id as well.

Download all attachments as: .zip

Change History (5)

Changed 8 years ago by Doug Haber <doug@…>

Attachment: lookup.diff added

comment:1 Changed 8 years ago by robertm

Status: newinfoneeded_new

Please try this patch instead. This should prevent your issue without the need for a hack that leaves updates of certain rule types unpredictable.

Changed 8 years ago by robertm

Attachment: recidupd.diff added

Update season, episode, inetref using rule id as well.

comment:2 Changed 8 years ago by doug@…

This patch solves my issue.

Thanks for the quick response!
Doug

comment:3 Changed 8 years ago by Github

Milestone: unknown0.25
Resolution: fixed
Status: infoneeded_newclosed

Use RecID to verify that changed Season, Episode, and Inetref are correct.

Prevents metadata from being potentially saved to the wrong programinfo/recrule/recording.

Fixes the issue reported by Doug Haber in #9931. Fixes #9931.

Branch: master Changeset: e90f0240f8735dd0d7d5b25a8bc8703097c23b7a

Note: See TracTickets for help on using tickets.