[mythtv-users] mythvidexport.py and 0.26

Stephen Robertson stephengrobertson at gmail.com
Sun Sep 2 20:25:10 UTC 2012


n Sun, Sep 2, 2012 at 8:48 PM, Raymond Wagner <raymond at wagnerrp.com> wrote:
> On 9/2/2012 15:03, Stephen Robertson wrote:
>>
>> On Tue, Aug 28, 2012 at 7:03 PM, Raymond Wagner <raymond at wagnerrp.com>
>> wrote:
>>>
>>> On 8/28/2012 12:06, Stephen Robertson wrote:
>>>>
>>>>
>>>> Hello All,
>>>>
>>>> Should I expect mythvidexport 0.7.5 from
>>>>
>>>>
>>>> https://github.com/wagnerrp/mythtv-scripts/blob/master/python/mythvidexport.py
>>>> to work with 0.26/master?
>>
>>
>> [trimmed]
>>
>>> There are currently outstanding issues in the Python bindings, dealing
>>> with
>>> the conversion of MythTV to use UTC internally.  They should be fixed by
>>> the
>>> time 0.26 is officially released.
>>
>>
>> I noticed the two commits relating to the python bindings so I thought
>> I would experiment with mythvidexport again.  I seem to be getting
>> more or less the same error when running it manually.  However when I
>> run it as a user job then it works(though I've not manged to get
>> recordings to delete.
>>
>> I suppose my questions are:
>>
>> Am I trying to use this from the command line correctly? And if so
>> what else could be wrong?
>
>
> The recommended manner of running is to use "%JOBID%", and let mythvidexport
> pull the recording information from the jobqueue table, rather than specify
> it directly with "%CHANID%" and "%STARTTIME%".
>
>
>> and
>> Where does log output from this end up? Or how do i specify that
>> location?
>
>
> It uses the same parameters as the rest of MythTV applications, specifically
> --logpath or --syslog. Preferably, you just have the jobqueue pass through
> all the necessary parameters with "%VERBOSEMODE%".
>
>
>> /home/stephen/mythvidexport.py --verbose all --chanid=1033
>> --starttime=20120826071000
>
>
> Could you use "--loglevel debug" as well, so I can see what is actually
> being passed to the database by the Recorded class? Also, are you using
> "%STARTTIME%" or "%STARTTIMEUTC%"? The bindings expect times to be in the
> local timezone, unless specified otherwise with a tz-aware format. Was the
> recording you are trying to archive actually recorded at 7:10AM local time?

Yes it was 7:10AM local time 6:10AM UTC (Kids cartoons!)

Running this manually:
stephen at bressay:~$ /home/stephen/mythvidexport.py --syslog local7
--loglevel debug --verbose all --chanid=1033
--starttime=20120826071000

gives this in the log:

Sep  2 21:19:54 bressay mythvidexport.py[27088]: Trying database
credentials from: /home/stephen/config.xml
Sep  2 21:19:54 bressay mythvidexport.py[27088]: Attempting
connection: sql://mythconverg@bressay:3306/
Sep  2 21:19:54 bressay mythvidexport.py[27088]: Spawning new database
connection
Sep  2 21:19:54 bressay mythvidexport.py[27088]: Spawning new database
connection
Sep  2 21:19:54 bressay mythvidexport.py[27088]: Acquiring connection from pool
Sep  2 21:19:54 bressay mythvidexport.py[27088]: SELECT data FROM
settings WHERE value LIKE(%s) -- ('DBSchemaVer',)
Sep  2 21:19:54 bressay mythvidexport.py[27088]: database callback
received -- 0x939a054
Sep  2 21:19:54 bressay mythvidexport.py[27088]: Releasing connection to pool
Sep  2 21:19:54 bressay mythvidexport.py[27088]: Acquiring connection from pool
Sep  2 21:19:54 bressay mythvidexport.py[27088]: SELECT data FROM
settings WHERE value=%s AND hostname='bressay' LIMIT 1 --
('mythvideo.TVexportfmt',)
Sep  2 21:19:54 bressay mythvidexport.py[27088]: database callback
received -- 0x939a0f4
Sep  2 21:19:54 bressay mythvidexport.py[27088]: Releasing connection to pool
Sep  2 21:19:54 bressay mythvidexport.py[27088]: Acquiring connection from pool
Sep  2 21:19:54 bressay mythvidexport.py[27088]: SELECT data FROM
settings WHERE value=%s AND hostname='bressay' LIMIT 1 --
('mythvideo.MOVIEexportfmt',)
Sep  2 21:19:54 bressay mythvidexport.py[27088]: database callback
received -- 0x939a0f4
Sep  2 21:19:54 bressay mythvidexport.py[27088]: Releasing connection to pool
Sep  2 21:19:54 bressay mythvidexport.py[27088]: Acquiring connection from pool
Sep  2 21:19:54 bressay mythvidexport.py[27088]: SELECT data FROM
settings WHERE value=%s AND hostname='bressay' LIMIT 1 --
('mythvideo.GENERICexportfmt',)
Sep  2 21:19:54 bressay mythvidexport.py[27088]: database callback
received -- 0x939a0f4
Sep  2 21:19:54 bressay mythvidexport.py[27088]: Releasing connection to pool
Sep  2 21:19:54 bressay mythvidexport.py[27088]: Loading existing
connection -- sql://mythconverg@bressay:3306/
Sep  2 21:19:54 bressay mythvidexport.py[27088]: Acquiring connection from pool
Sep  2 21:19:54 bressay mythvidexport.py[27088]: SELECT data FROM
settings WHERE value=%s AND hostname IS NULL LIMIT 1 --
('DBSchemaVer',)
Sep  2 21:19:54 bressay mythvidexport.py[27088]: database callback
received -- 0x939a6e4
Sep  2 21:19:54 bressay mythvidexport.py[27088]: Releasing connection to pool
Sep  2 21:19:54 bressay mythvidexport.py[27088]: Loading existing
connection -- sql://mythconverg@bressay:3306/
Sep  2 21:19:54 bressay mythvidexport.py[27088]: Loading existing
connection -- sql://mythconverg@bressay:3306/
Sep  2 21:19:54 bressay mythvidexport.py[27088]: set _table to recorded
Sep  2 21:19:54 bressay mythvidexport.py[27088]: set _logmodule to
Python Recorded
Sep  2 21:19:54 bressay mythvidexport.py[27088]: Acquiring connection from pool
Sep  2 21:19:54 bressay mythvidexport.py[27088]: DESC recorded -- None
Sep  2 21:19:54 bressay mythvidexport.py[27088]: database callback
received -- 0x93a184c
Sep  2 21:19:54 bressay mythvidexport.py[27088]: Releasing connection to pool
Sep  2 21:19:54 bressay mythvidexport.py[27088]: Acquiring connection from pool
Sep  2 21:19:54 bressay mythvidexport.py[27088]: SHOW KEYS FROM
recorded WHERE Key_name='PRIMARY' -- None
Sep  2 21:19:54 bressay mythvidexport.py[27088]: set _key to
[u'chanid', u'starttime']
Sep  2 21:19:54 bressay mythvidexport.py[27088]: set _where to
chanid=? AND starttime=?
Sep  2 21:19:54 bressay mythvidexport.py[27088]: set _setwheredat to
self.chanid,self.starttime,
Sep  2 21:19:54 bressay mythvidexport.py[27088]: database callback
received -- 0x93a1874
Sep  2 21:19:54 bressay mythvidexport.py[27088]: Releasing connection to pool
Sep  2 21:19:54 bressay mythvidexport.py[27088]: Acquiring connection from pool
Sep  2 21:19:54 bressay mythvidexport.py[27088]: SELECT * FROM
recorded WHERE chanid=%s AND starttime=%s -- [1033, datetime(2012, 8,
26, 6, 10)]
Sep  2 21:19:54 bressay mythvidexport.py[27088]: database callback
received -- 0x93a1c5c
Sep  2 21:19:54 bressay mythvidexport.py[27088]: Releasing connection to pool


More information about the mythtv-users mailing list