[mythtv-users] Excessive disk usage in remotecache on Raspberry Pi

Jerome Yuzyk jerome at supernet.ab.ca
Tue Dec 6 19:53:33 UTC 2016


On Tuesday, December 06, 2016 11:46:17 AM Nick Morrott wrote:
> On 6 December 2016 at 11:33, Tremayne, Steve
> <steven.tremayne at honeywell.com> wrote:
> > Going back to the original post:
> >
> >>> This directory has many files with names like 3707_20161124170000.ts.png.
> >
> > Isn't the conversation about ctime / atime / mtime / *time irrelevant? The filename already contains a timestamp...
> 
> Simple is usually better, and that is stat-agnostic.
> 
> > So, couldn't the logic be something simpler like "if (characters 6-13) of filename > (today + 30days) then delete"?
> 
> Perhaps when retrieving the list of recordings, a frontend
> housekeeping job could automatically detect thumbnails with "dates in
> filenames" earlier than the earliest recording still available in the
> recording list?
> 
> That's an easy way (assuming I haven't missed something obvious) of
> trimming old and unused thumbnails, but is of limited use in
> situations where very old recordings are kept. The logic should be
> very simple though.

For my little script I just looked for .pngs in remotecache that weren't in any of my storage directories. All the PNGs in my remotecache just duplicated ones that were created alongside my recordings. That ought to satisfy most needs if recordings are watched and (eventually) deleted like I think most people do. No need for any *time. My script is meant for my FE/BE case but using the Services API a bit more I think it could be used on a FE or a FE/BE.

-- 
A little of Jerome's MythTV World: http://mythtv.bss.ab.ca


More information about the mythtv-users mailing list