[mythtv-users] Deleting recordings after conversion

Andréas Kühne andreas at kuhne.se
Fri Oct 18 18:01:50 UTC 2013


2013/10/18 Michael T. Dean <mtdean at thirdcontact.com>

> On 10/18/2013 01:46 PM, George Nassas wrote:
>
>> On 2013-10-18, at 8:49 AM, Michael T. Dean wrote:
>>
>>  Much better than
>>>
>>
>> I’d like to throw in a suggestion to use the services API:
>>
>> curl "http://backendIP:6544/Dvr/**RemoveRecorded?ChanId=$CHANID&**
>> StartTime=$STARTIME<http://backendIP:6544/Dvr/RemoveRecorded?ChanId=$CHANID&StartTime=$STARTIME>
>>>>
>> will do the trick. You’d need a little shell date wizardry to get the
>> start time in an acceptable format but that’s about it. Two lines in a
>> shell script and you’re isolated from future myth internal changes. Ask
>> here if you need help with the start time.
>>
>
> That would work, too, and still uses MythTV to do all the data
> manipulation/access, so has many of the same benefits. So it, too, is
> definitely better than the direct DB manipulation.
>
> Which means, at that point, the question becomes mainly whether it's
> easier to do the date wizardry in a shell script before calling an
> existing/already-installed program or just use a (real ;) programming
> language like Python (which requires having another script, assuming your
> user job script isn't in Python). As a matter of fact, I'm pretty sure that
> the bindings do the wizardry for us and we can just pass back the exact
> value the user job receives. Then again, if the service API call doesn't
> handle the various "MythTV" date formats (including the one given to user
> jobs), it should be fixed to allow any of them to be used (and
> automatically detect which), like the command-line tools do. Then, you'd
> only have to worry about URL-encoding the value, unless curl does that for
> you.
>
> If I get some time, I may go ahead and show how easy it is to do a one-off
> delete script with the Python bindings, but it won't be this week. (I'm not
> posting it until I've been able to test it.)
>
>
> Mike
> ______________________________**_________________
> mythtv-users mailing list
> mythtv-users at mythtv.org
> http://www.mythtv.org/mailman/**listinfo/mythtv-users<http://www.mythtv.org/mailman/listinfo/mythtv-users>
>

Thanks for all the suggestions!

Both the python and web service API sound interesting. I'll give them a try.

Regards,

Andréas
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.mythtv.org/pipermail/mythtv-users/attachments/20131018/a3f2b559/attachment.html>


More information about the mythtv-users mailing list