[mythtv-users] list my "damaged" recordings

Evuraan evuraan at gmail.com
Tue Oct 27 03:09:12 UTC 2015


> Interesting that you replied to Bill Meek's excellent reply that gave you a
> nice Python-bindings-based script to ask MythTV what recordings are damaged,
> but somehow morphed it into a shell script that attempts to identify which
> recordings are damaged by interpreting MythTV's raw data in its internal
> data format and then improperly deletes a recording by directly editing
> MythTV's raw data in its internal data format without taking into account
> cross-table relationships and all the things that need to be done to do a
> safe deletion.  You really need to ask MythTV to delete the recording for
> you or things aren't cleaned up properly.
>
> For anyone reading the list archives, please do not run this script (or any
> like it).
>
> The proper approach is to use something like Bill's suggestion (which was
> cut from this reply, but can be seen at:
> http://www.gossamer-threads.com/lists/mythtv/users/591759#591759 ) to
> identify the damaged recordings and something like
> https://www.mythtv.org/wiki/Delete_recordings.py to ask MythTV to do the
> deletion.
>
> Or, if you really want to do it often, just add delete functionality to
> Bill's script.
>
> So, in short:
>   Python bindings ask MythTV for information and MythTV does the
> interpretation of its raw data.  Python bindings ask MythTV to delete
> recordings and MythTV does everything required to properly and completely
> delete the recordings.
>   Direct raw data manipulation presumes that you a) know the internal MythTV
> data format and constraints and b) interpret that data properly.  Putting
> direct raw-data manipulation into a script presumes that a) MythTV won't
> change its internal data format and constraints or that b) you'll know when
> it does and update the script.
>
> So, please, don't do the work.  Use the bindings to ask MythTV to do the
> work for you.
>
> Mike
>

While I  agree bindings is the safe way forward, I went my way since I
cannot use the bindings presently:

    _program=recordings.getRecordedProgram()
  File "/usr/lib/pymodules/python2.6/MythTV/dataheap.py", line 345, in
getRecordedProgram
    return RecordedProgram.fromRecorded(self)
  File "/usr/lib/pymodules/python2.6/MythTV/dataheap.py", line 546, in
fromRecorded
    return cls((recorded.chanid, recorded.progstart), recorded._db)

ERROR: An unexpected error occurred while tokenizing input
The following traceback may be corrupted or invalid
The error message is: ('EOF in multi-line statement', (341, 0))

Likely a  scar from my past transgressions - and I still run 0.25 -
and I needed something quick to work given my situation.

Cheers!


More information about the mythtv-users mailing list