Old TV recordings not being automatically deleted

  Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Post Reply
chjohans Offline
Junior Member
Posts: 13
Joined: Dec 2016
Reputation: 0
Post: #16
A gentle bump in case you missed this one margro, I could use some input on this.
find quote
chjohans Offline
Junior Member
Posts: 13
Joined: Dec 2016
Reputation: 0
Post: #17
margro: This is still a problem, recordings are NOT being deleted. Could you give some feedback on what I wrote above please?

If lack of time is the issue I'll be more than happy to take a look at your code and see if I can get this fixed. Was gonna write a small program that deletes recordings based on my logic above, but I figure the time will be better spent fixing the real issue.

Please let me know, thanks!
find quote
mcelliott Offline
Fan
Posts: 382
Joined: Mar 2015
Reputation: 5
Post: #18
Well, if the client is setting the keepUntil field as 1 (until watched) then it would make sense for the client to be responsible for the deletion I suppose.

If you are setting it as keepUntil a date, then it would have to be the back end.

I repeat my advice to you. Install the MediaPortal front end, and set a few recordings there. Check what is in the database, and see if the deletion works as expected. If it all works fine within MediaPortal, then you are in a position to compare directly and see if the Kodi plugin is setting things incorrectly. If it is, I'd say it is likely to be an easy fix.
find quote
chjohans Offline
Junior Member
Posts: 13
Joined: Dec 2016
Reputation: 0
Post: #19
Yes it's the backend that is responsible for deleting, except when keepUntil is 1 as you say.

I have verified that recordings gets deleted when I schedule them with the MP frontend.

Seems like my theory re how the dates are interpreted are correct.

margro: need your input on this please. I realize that this is done on your spare time, hence the offer to have a look at the code and help out correcting this. Please advise, thanks!
find quote
mcelliott Offline
Fan
Posts: 382
Joined: Mar 2015
Reputation: 5
Post: #20
So, we need a clear statement of what is entered into the database when MediaPortal schedules the recording, and what Kodi does it, so we can see what is different.

Logs of MediaPortal deleting a recording might also help.

Ultimately, a quick search of the plugin code for 'keepUntil' might help. If the wrong number is being placed in the field, I don't think it will be too hard to fix.

Best wishes,

Mark
find quote
chjohans Offline
Junior Member
Posts: 13
Joined: Dec 2016
Reputation: 0
Post: #21
I'll be busy the next few weeks but I'll look into this again in a few weeks, will do some testing and compare the difference in the DB for recording schedules set by Kodi vs media Portal itself. I agree it should be an easy fix, if there is any interest in fixing it. My understanding is that margro is maintaining the MP Kodi plugin, and he has stopped responding so not sure who can fix this. I could give it a shot myself but can't find the source for the plugin (at least not an updated version) anywhere.
find quote
pĆ¼nktchen Offline
Fan
Posts: 346
Joined: Jul 2012
Reputation: 10
Post: #22
(2017-04-20 04:29)chjohans Wrote:  I'll be busy the next few weeks but I'll look into this again in a few weeks, will do some testing and compare the difference in the DB for recording schedules set by Kodi vs media Portal itself. I agree it should be an easy fix, if there is any interest in fixing it. My understanding is that margro is maintaining the MP Kodi plugin, and he has stopped responding so not sure who can fix this. I could give it a shot myself but can't find the source for the plugin (at least not an updated version) anywhere.
https://github.com/margro?tab=repositories
find quote
popy Offline
Senior Member
Posts: 213
Joined: Nov 2008
Reputation: 1
Post: #23
Same issue here, have set the Mediaportal TVServer to delete recordings if the disk quota is less than 110 GB.
Sadly TV Server doesnt delete the recordings.
After a quick look into the DB in table "recording" brings light intothe issue.
The field "keepUntil" is "3" -> so the recordings will be keept "Always"
Is it possible that the addon is putting the wrong number into the field?

pOpY
find quote
popy Offline
Senior Member
Posts: 213
Joined: Nov 2008
Reputation: 1
Post: #24
Update: On the timer Dialog, there is "lifespan" setting, see here: http://imgur.com/a/dOzSh
Sadly i cant find the default setting for this, my wife and kids always using default settings here, so recordings gets keept forever.

Any hints?
find quote
popy Offline
Senior Member
Posts: 213
Joined: Nov 2008
Reputation: 1
Post: #25
deleted!
(This post was last modified: 2017-06-19 22:34 by popy.)
find quote
popy Offline
Senior Member
Posts: 213
Joined: Nov 2008
Reputation: 1
Post: #26
Hey guys.

I'll think i have fixed the issue in changing the default value of the recording dialog from MPTV_KEEP_ALWAYS to MPTV_KEEP_UNTIL_SPACE_NEEDED (which is default in MP itself).
The change i have made in file "timers.cpp" of the pvr-mediaportal.tvserver addon.

Just change line 664 from:

Code:
timertype.iLifetimesDefault = -MPTV_KEEP_ALWAYS; //Negative = special types, positive values is days

to

Code:
timertype.iLifetimesDefault = -MPTV_KEEP_UNTIL_SPACE_NEEDED; //Negative = special types, positive values is days


Here is a hotfix (compiled binary for windows x86 krypton v17.3): https://drive.google.com/file/d/0B4JpRMZ...sp=sharing
Just did a quick test on two clients and it works for me.

Sorry for posting this here, but i am not familiar with git/fork/branch !
Maybe someone which is familiar with git and kodi can fix this in official krypton/master branch?
I have created a ticket on github: https://github.com/kodi-pvr/pvr.mediapor.../issues/70
And an pull request: https://github.com/kodi-pvr/pvr.mediapor...er/pull/71

Hope it gets merged in for future stable krypton releases.

thx
pOpY
(This post was last modified: 2017-06-21 19:13 by popy.)
find quote
Post Reply