From 17ed75c684d6c75d87e26a5ad3993a73cb3becf2 Mon Sep 17 00:00:00 2001 From: hummypkg Date: Mon, 19 May 2014 20:36:08 +0000 Subject: [PATCH] add wage --- CONTROL/control | 6 +++--- webif/plugin/sweeper/auto.hook | 6 ++++++ 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/CONTROL/control b/CONTROL/control index 6301992..7f90fab 100644 --- a/CONTROL/control +++ b/CONTROL/control @@ -1,9 +1,9 @@ Package: sweeper Priority: optional Section: misc -Version: 1.0.9-3 +Version: 1.0.10 Architecture: mipsel Maintainer: af123@hummypkg.org.uk -Depends: webif(>=1.0.9) -Description: Automatically manage single recording files. [Fix for spurious Invalid TS File messages] +Depends: webif(>=1.0.13-2) +Description: Automatically manage single recording files. [Add 'wage' condition] Tags: http://hummy.tv/forum/threads/3843/ diff --git a/webif/plugin/sweeper/auto.hook b/webif/plugin/sweeper/auto.hook index 1fa60ad..41b2a58 100644 --- a/webif/plugin/sweeper/auto.hook +++ b/webif/plugin/sweeper/auto.hook @@ -87,6 +87,12 @@ proc ::sweeper::age {ts age} { return [::sweeper::intcomp $recage $age] } +proc ::sweeper::wage {ts age} { + set recage $(([clock seconds] - [$ts lastmod]) / 3600) + log " ... Watched age: $recage" 2 + return [::sweeper::intcomp $recage $age] +} + proc ::sweeper::definition {ts def} { return [::sweeper::strcontains [$ts get definition] $def] }