Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
DVR Service: Fix recording deletion API.
As with a few other APIs, this was developed on a slave backend,
where a remote delete request could work.  As the best/correct use
of the APIs is to speak to the MBE, allow the API to work
by sending the deletion mythmessage.

Testing and working with proper UTC input.  Fixes #10540.
  • Loading branch information
Robert McNamara committed Apr 3, 2012
1 parent f81f712 commit 98f0a52
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion mythtv/programs/mythbackend/services/dvr.cpp
Expand Up @@ -27,6 +27,7 @@
#include "compat.h"
#include "mythversion.h"
#include "mythcorecontext.h"
#include "mythevent.h"
#include "scheduler.h"
#include "autoexpire.h"
#include "jobqueue.h"
Expand Down Expand Up @@ -183,8 +184,18 @@ bool Dvr::RemoveRecorded( int nChanId,

ProgramInfo *pInfo = new ProgramInfo(nChanId, dStartTime);

QString cmd = QString("DELETE_RECORDING %1 %2")
.arg(nChanId)
.arg(dStartTime.toString(Qt::ISODate));
MythEvent me(cmd);

LOG(VB_GENERAL, LOG_INFO, cmd);

if (pInfo->HasPathname())
bResult = RemoteDeleteRecording(nChanId, dStartTime, true, false);
{
gCoreContext->dispatch(me);
bResult = true;
}

return bResult;
}
Expand Down

0 comments on commit 98f0a52

Please sign in to comment.