Posts: 1,976
Joined: Jul 2012
Reputation:
72
Users have been reporting issues when folders of recordings have been deleted and I was able to duplicate it when I have lots of recordings and found the crash was on one lock not being set in Kodi. Deletes are async so it is a bit hard for me to trace. I do see in pvr-nextpvr after each delete there is a PVR->TriggerRecordingUpdate(). Is this necessary? Perhaps Kodi is already taking care of removing recording file items and that code is just introducing extra overhead and chances for collision.
Thanks.
Martin
Posts: 87
Joined: Jan 2017
Reputation:
5
For what it's worth I don't call the trigger on delete, Kodi takes care of it. No reported issues with deleting folders. I just delete from the back end and report success/fail.
I try to call the triggers as infrequently as possible, and ultimately stopped calling the EPG one entirely due to similar problems. That was on Krypton, though
Posts: 1,976
Joined: Jul 2012
Reputation:
72
Thanks Michael,
That probably is the problem. For now I will test to see what happens.
Martin
Posts: 1,976
Joined: Jul 2012
Reputation:
72
So I tested DeleteRecordings without doing the trigger afterward and it did remove the recording from the file list. Going by your statement I tried to do the same thing on DeleteTimer and it definitely requires me to update the trigger. There are many GUI issues (timer is still in the list, the red circle stays on the items, "Currently Recording" box stays open). Other triggers require a uid from the backend so they can't be removed.
That made me think of another test and I tried to delete a folder containing an an in progress recording. That did not work well. It has the same screen issues as deleting an in progress recording partly because the timer is deleted but there is no second call to delete the recording. That is probably a good thing, but all indications were that the file is still recording so that case needs a trigger too.
Worth a shot though
Martin
Posts: 1,976
Joined: Jul 2012
Reputation:
72
I thought I had a partial solution to this by returning PVR_ERROR_RECORDING_RUNNING but that is for timers and just gives a generic error to the user telling them to look in the logs.
Martin