bucky2780
thanks all for the input.. problem is now cleared up....
here is the py snippet I used to clean things up. Hope it helps someone in the future...
In truth, don't know why there isn't a button that cleans up the dvr log when needed. This has happened to me a few times.... At least I now have a repeateable solution.
thanks again...
import requests
import os
import json
tvh_user="useri"
tvh_pass="pw"
tvh_server="192.168.xx.xx"
#urlTvhead = "http://" + tvh_user + ":" + tvh_pass + "@" + tvh_server + ":9981/api/dvr/entry/grid_finished?limit=10000"
#urlTvhead = "http://" + tvh_server + ":9981/api/dvr/entry/grid_finished?limit=10000"
#use Removed, or Finished to get a decent list of stuff
#in this case... I am seeing 300 removed entries for whcih there is no physical file... and am getting stat errors for these.
urlTvhead = "http://" + tvh_server + ":9981/api/dvr/entry/grid_removed?limit=10000"
urlTvheadRemove = "http://" + tvh_server + ":9981/api/dvr/entry/remove?uuid="
print(urlTvhead)
entries = requests.get(urlTvhead).json()
recs = 0
missingRecs = 0
for entry in entries['entries']:
resFilename="/mnt/nas/data/tvheadend" + entry['filename']
uid=entry['uuid']
recs += 1
if not os.path.isfile(resFilename):
missingRecs += 1
print("\n" + "uid:" + uid + "|" +resFilename)
# use this to delete to offending entry using the uid from above....
#requests.get(urlTvheadRemove + uid)
print ("recs read is : " + str(recs))
print ("missing-deleted recs are : " + str(missingRecs))