[mythtv-users] HELP! Really odd stuff with old deleted recordings and find_orphans.py

Mark Perkins perkins1724 at hotmail.com
Mon Oct 29 02:34:37 UTC 2018



On 29 October 2018 11:53:47 am Tom Dexter <digitalaudiorock at gmail.com> wrote:

> Wow...I desperately need help here. I don't get what's going on. A
> little background:
>
> I had to replace the drive in my backend. I restored the OS etc from
> clonzilla backups, and restored a current backup of the database...all
> went just fine. I was also able to recover the recordings I cared
> about from the old drives. As far as the others where I had an entry
> listed in the recordings and no actual file, I deleted those in
> mythweb, and everything seemed fine.
>
> Today I noticed a ton of these in the mythbackend log:
>
> 2018-10-28 08:28:46.756113 N [21736/21763] Expire autoexpire.cpp:637
> (SendDeleteMessages) - Expiring 2225 MB for 1071 at
> 2018-10-21T22:30:00Z => "ABC
> World News Tonight With David Muir"
> 2018-10-28 08:28:46.756175 N [21736/21763] Expire autoexpire.cpp:637
> (SendDeleteMessages) - Expiring 1839 MB for 1071 at
> 2018-10-19T22:30:00Z => "ABC
> World News Tonight With David Muir"
> 2018-10-28 08:28:46.756225 N [21736/21763] Expire autoexpire.cpp:637
> (SendDeleteMessages) - Expiring 1964 MB for 1071 at
> 2018-10-18T22:30:00Z => "ABC
> World News Tonight With David Muir"
> 2018-10-28 08:28:46.756274 N [21736/21763] Expire autoexpire.cpp:637
> (SendDeleteMessages) - Expiring 1824 MB for 1071 at
> 2018-10-17T22:30:00Z => "ABC
> World News Tonight With David Muir"
> 2018-10-28 08:28:46.756325 N [21736/21763] Expire autoexpire.cpp:637
> (SendDeleteMessages) - Expiring 2017 MB for 1071 at
> 2018-10-16T22:30:00Z => "ABC
> World News Tonight With David Muir"
> 2018-10-28 08:28:46.756374 N [21736/21763] Expire autoexpire.cpp:637
> (SendDeleteMessages) - Expiring 1813 MB for 1071 at
> 2018-10-15T22:30:00Z => "ABC
> World News Tonight With David Muir"
>
> ...as well as ones like these;
>
> 2018-10-28 08:28:46.771847 E [21736/21736] CoreContext
> programinfo.cpp:2608 (GetPlaybackURL) -
> ProgramInfo(1071_20181021223000.ts): GetPlaybackURL: '1
> 071_20181021223000.ts' should be local, but it can not be found.
> 2018-10-28 08:28:46.771943 E [21736/21736] CoreContext
> mainserver.cpp:3069 (DoHandleDeleteRecording) - MainServer: ERROR when
> trying to delete file: G
> etPlaybackURL/UNABLE/TO/FIND/LOCAL/FILE/ON/mythback/1071_20181021223000.ts.
> File doesn't exist.  Database metadata will not be removed.
> 2018-10-28 08:28:46.801380 E [21736/21736] CoreContext
> programinfo.cpp:2608 (GetPlaybackURL) -
> ProgramInfo(1071_20181019223000.ts): GetPlaybackURL: '1
> 071_20181019223000.ts' should be local, but it can not be found.
> 2018-10-28 08:28:46.801476 E [21736/21736] CoreContext
> mainserver.cpp:3069 (DoHandleDeleteRecording) - MainServer: ERROR when
> trying to delete file: G
> etPlaybackURL/UNABLE/TO/FIND/LOCAL/FILE/ON/mythback/1071_20181019223000.ts.
> File doesn't exist.  Database metadata will not be removed.
> 2018-10-28 08:28:46.825473 E [21736/21736] CoreContext
> programinfo.cpp:2608 (GetPlaybackURL) -
> ProgramInfo(1071_20181018223000.ts): GetPlaybackURL: '1
> 071_20181018223000.ts' should be local, but it can not be found.
>
> Those are ALL from recordings I deleted...they do NOT show in the
> recordings screen...and I have no idea where they're coming from.
> Totally lost. The find_orphans.py script sees these as
> well...*everything* I've deleted in mythweb:
>
> ./find_orphans.py
> Recordings with missing files
>  mythback: A Cat's Attic: Yusuf/Cat Stevens
>       1131_20180810023000.ts
>  mythback: ABC World News Tonight
>       1071_20180930223000.ts
>  mythback: ABC World News Tonight
>       1071_20181014223000.ts
>  mythback: ABC World News Tonight
>       1071_20180923223000.ts
>  mythback: ABC World News Tonight With David Muir
>       1071_20181021223000.ts
>  mythback: ABC World News Tonight With David Muir
>       1071_20180727223000.ts
> ...etc...
>
>           Count:          87
> Other files
>  mythback: /video/recordings/1021_20181025000000.ts.png.EB6667
>                      845.1KB
>  mythback: /video/recordings/1021_20181025000000.ts.png.Lf6756
>                      221.6KB
> ...etc...
>
>
>           Total:       4.1MB
> Please select from the following
> 1. Delete orphaned recording entries
> 2. Delete other files
> 3. Refresh list
>
> Again, I have no idea where they're coming from and worse yet, if I
> try to use option 1 to delete those I get this:
>
> Are you sure you want to continue?
>> yes
> Traceback (most recent call last):
>  File "./find_orphans.py", line 230, in <module>
>    main()
>  File "./find_orphans.py", line 214, in main
>    opt[1](opt[2])
>  File "./find_orphans.py", line 129, in delete_recs
>    rec.delete(True, True)
>  File "/usr/lib/python2.7/site-packages/MythTV/dataheap.py", line
> 375, in delete
>    return self.getProgram().delete(force, rerecord)
>  File "/usr/lib/python2.7/site-packages/MythTV/dataheap.py", line
> 387, in getProgram
>    return Program.fromRecorded(self)
>  File "/usr/lib/python2.7/site-packages/MythTV/mythproto.py", line
> 946, in fromRecorded
>    return be.getRecording(rec.chanid, rec.starttime)
>  File "/usr/lib/python2.7/site-packages/MythTV/mythproto.py", line
> 647, in getRecording
>    return Program(res[1:], db=self.db)
>  File "/usr/lib/python2.7/site-packages/MythTV/mythproto.py", line
> 875, in __init__
>    DictData.__init__(self, raw)
>  File "/usr/lib/python2.7/site-packages/MythTV/altdict.py", line 148,
> in __init__
>    data = self._process(data)
>  File "/usr/lib/python2.7/site-packages/MythTV/altdict.py", line 164,
> in _process
>    data[i] = self._trans[self._field_type[i]](v)
>  File "/usr/lib/python2.7/site-packages/MythTV/altdict.py", line 104,
> in <lambda>
>    lambda x: datetime.fromtimestamp(x, datetime.UTCTZ())\
>  File "/usr/lib/python2.7/site-packages/MythTV/utility/dt.py", line
> 304, in fromtimestamp
>    obj = super(datetime, cls).fromtimestamp(float(timestamp), tz)
> ValueError: timestamp out of range for platform time_t
>
> Any help would be appreciated. I've never had an issue with deleting
> anything in mythweb for sure. I just looked an it appears these all
> still have rows in the recorded table. That shouldn't be the case
> correct?
>
> What on earth could be going on there?
>
> Tom
> _______________________________________________
> mythtv-users mailing list
> mythtv-users at mythtv.org
> http://lists.mythtv.org/mailman/listinfo/mythtv-users
> http://wiki.mythtv.org/Mailing_List_etiquette
> MythTV Forums: https://forum.mythtv.org
My understanding is that is expected behaviour. find_orphans.py just asks 
mythtv to do the delete. mythtv won't delete the metadata unless it can 
find the file.

IIRC just go to FE recordings screen, change group filter to "Deleted", 
select All Programmes, menu, add this group to playlist, menu, playlist 
options, delete. Will get some sort of 'are you really REALLY sure' type 
message, I don't recall wording.




More information about the mythtv-users mailing list