<div dir="ltr"><div class="gmail_quote"><div dir="ltr">On Sat, 21 Jul 2018 at 16:34, Bill Meek <<a href="mailto:keemllib@gmail.com">keemllib@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">On 07/21/2018 08:59 AM, George Poulson wrote:<br>
> On 21 July 2018 at 14:56, Bill Meek <<a href="mailto:keemllib@gmail.com" target="_blank">keemllib@gmail.com</a> <mailto:<a href="mailto:keemllib@gmail.com" target="_blank">keemllib@gmail.com</a>>> wrote:<br>
> <br>
> Does line 100 in find_orphans.py look like this?<br>
> <br>
> if not (f.endswith('.mpg') or f.endswith('.nuv') or f.endswith('.ts')):<br>
> <br>
> <br>
> <br>
> Mine does, yes :-)<br>
> George<br>
<br>
"Works for me" using the version on the Wiki.<br>
<br>
I assume 'tvbox' is the correct hostname.<br>
<br>
diff ~mythtv/.mythtv/config.xml ~/.mythtv/config.xml should match. Which should<br>
be the case assuming "everything works fine" means that mythfrontend<br>
works when run as your own user. *Important* as Storage Groups are searched<br>
here to develop the list of filenames.<br>
<br>
I'd start planting print statements in find_orphans.py. Looks like the<br>
list of files is getting created, but for some reason names from metadata<br>
aren't being removed (unfiltered.remove().)<br>
<br>
When I add the print statement below line 98:<br>
<br>
for f in list(unfiltered):<br>
if name in f:<br>
unfiltered.remove(f)<br>
print 'removed from unfiltered list: {}'.format(f)<br>
<br>
I get lots of output, as it excludes matching files in the metadata.<br>
<br>
You could do this too to see if the metadata list is created<br>
note that kwargs includes the hostname. After line 84:<br>
<br>
recs = list(DB.searchRecorded(**kwargs))<br>
for blah in recs:<br>
print 'metadata: {}'.format(blah.basename)<br>
<br><br></blockquote><div><br></div><div><div style="font-size:small" class="gmail_default">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.</div><div style="font-size:small" class="gmail_default"><br></div><div style="font-size:small" class="gmail_default">Adding the print statements as suggested produced no output at all, so I guessed that somehow the backend database just wasn't being accessed.</div><div style="font-size:small" class="gmail_default"><br></div><div style="font-size:small" class="gmail_default">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.</div><div style="font-size:small" class="gmail_default"><br></div><div style="font-size:small" class="gmail_default">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.</div><div style="font-size:small" class="gmail_default"><br></div><div style="font-size:small" class="gmail_default">I have absolutely no idea how this error has occured.</div><div style="font-size:small" class="gmail_default"><br></div><div style="font-size:small" class="gmail_default">George</div><div style="font-size:small" class="gmail_default"><br></div><br></div><div><br></div><div> </div></div></div>