Automatic deletion of Watched recordings after XX Days

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Automatic deletion of Watched recordings after XX Days

Concept211
This post was updated on .
My wife is notorious of watching her episodes but never deleting them - drives me crazy. I would like an automated way of deleting the files after a predefined/configurable number of days after it has been flagged as "watched".

I could even code a simple VBS script to scan the files and delete them myself, but how do I interface with Recorded TV HD's database? Is this stored anywhere that is easily accessible?

Thanks!

EDIT:
Jump to my last post for the download link to the script I wrote.
Reply | Threaded
Open this post in threaded view
|

Re: Automatic deletion of Watched recordings after XX Days

MJT Software
Administrator
I think you're in luck. Even though the watched info is in the database, for various reasons I also have watched information in text files. You can write a script to read those text files (which only contains the point in time where it will resume from), and use the modified date to see how long ago it was last watched.

You should be able to figure it out from there if you've written any scripts before. If not, let me know.
Reply | Threaded
Open this post in threaded view
|

Re: Automatic deletion of Watched recordings after XX Days

MJT Software
Administrator
Forgot to mention where the bookmark txt files are :)

C:\Users\Public\RecordedTVHD\database\bookmarks
or here:
C:\ProgramData\RecordedTVHD\database\bookmarks
Reply | Threaded
Open this post in threaded view
|

Re: Automatic deletion of Watched recordings after XX Days

Concept211
Thanks MJT!

I actually found that dir and I was looking at the files already but the only bad thing is that there's the potential that a show may have been paused anywhere in the timeline and it just sits there for several days. So my script might assume that it has been completely watched and deletes it. I suppose I could read each file and check for a time stamp of 1:00+ or 0:30+ to see it's possibly completely watched. Or maybe the next step is reading the file's metatag to grab the duration of the WTV file comparing times to see if they match up or not.

I also noticed there are several files with "0" for their times/bookmarks - is this by design?

Thanks again for your prompt response! It's really appreciated to see a developer active on their support forums and communicating with their customers :)
Reply | Threaded
Open this post in threaded view
|

Re: Automatic deletion of Watched recordings after XX Days

Concept211
This post was updated on .
If anyone's interested, I went ahead and wrote a VBS script that you can schedule to run on a nightly basis to clean up your WTV files.

It's pretty self-explanatory. Just modify the settings variables at the top of the file to specify your paths and time/days thresholds. You can also set it to either delete the files permanently or move them to another directory/path. You can then use the Windows "Task Scheduler" to schedule when to run and just point to where ever you saved the RTVHD-Cleanup.vbs file.

Download RTVHD-Cleanup.vbs

Just let me know if you have any questions.

EDIT:
I added a logging feature so that you can have a history of what has been cleaned up and when (my wife's show that she never deletes):