[mythtv-users] find_orphans.py not working on current?

George Poulson george.poulson at gmail.com
Sun Dec 9 13:10:23 UTC 2018


On Sat, 21 Jul 2018 at 16:34, Bill Meek <keemllib at gmail.com> wrote:

> On 07/21/2018 08:59 AM, George Poulson wrote:
> > On 21 July 2018 at 14:56, Bill Meek <keemllib at gmail.com <mailto:
> keemllib at gmail.com>> wrote:
> >
> >     Does line 100 in find_orphans.py look like this?
> >
> >          if not (f.endswith('.mpg') or f.endswith('.nuv') or
> f.endswith('.ts')):
> >
> >
> >
> > Mine does, yes :-)
> > George
>
> "Works for me" using the version on the Wiki.
>
> I assume 'tvbox' is the correct hostname.
>
> diff ~mythtv/.mythtv/config.xml ~/.mythtv/config.xml should match. Which
> should
> be the case assuming "everything works fine" means that mythfrontend
> works when run as your own user. *Important* as Storage Groups are searched
> here to develop the list of filenames.
>
> I'd start planting print statements in find_orphans.py. Looks like the
> list of files is getting created, but for some reason names from metadata
> aren't being removed (unfiltered.remove().)
>
> When I add the print statement below line 98:
>
>              for f in list(unfiltered):
>                  if name in f:
>                      unfiltered.remove(f)
>                      print 'removed from unfiltered list: {}'.format(f)
>
> I get lots of output, as it excludes matching files in the metadata.
>
> You could do this too to see if the metadata list is created
> note that kwargs includes the hostname. After line 84:
>
>      recs = list(DB.searchRecorded(**kwargs))
>      for blah in recs:
>          print 'metadata: {}'.format(blah.basename)
>
>
>
It's a long time now since I came across this issue, but having just found
(and fixed) the problem I thought I should post an update.

Adding the print statements as suggested produced no output at all, so I
guessed that somehow the backend database just wasn't being accessed.

Trawling through the database 'settings' table I found that the required
entry of 'BackendServerIP' did not exist, but instead was an entry
'BackendServerAddr' with the correct IP address as data.

I have updated my 'find_orphans.py' script (lines 60 and 68 or
thereabouts), changing 'BackendServerIP' to 'BackendServerAddr' and the
script now works as expected.

I have absolutely no idea how this error has occured.

George
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mythtv.org/pipermail/mythtv-users/attachments/20181209/9491759c/attachment.html>


More information about the mythtv-users mailing list