Skip to content

Commit

Permalink
Service Dvr/UpdateRecordedMetadata: Allow setting origairdate to null
Browse files Browse the repository at this point in the history
Fix inconsistent behaviour where original air date could be null but
after setting a vaule you could not set it back to null.
  • Loading branch information
bennettpeter committed Jun 10, 2023
1 parent 7592c61 commit 50f3f17
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion mythtv/programs/mythbackend/servicesv2/v2dvr.cpp
Expand Up @@ -2214,7 +2214,8 @@ bool V2Dvr::UpdateRecordedMetadata ( uint RecordedId,

if (HAS_PARAMv2("OriginalAirDate"))
{
if (!OriginalAirDate.isValid())
// OriginalAirDate can be set to null by submitting value 'null' in json
if (!OriginalAirDate.isValid() && !OriginalAirDate.isNull())
{
LOG(VB_GENERAL, LOG_ERR, "Need valid OriginalAirDate yyyy-mm-dd.");
return false;
Expand Down

0 comments on commit 50f3f17

Please sign in to comment.