From patchwork Tue Apr 14 19:45:06 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Andreas Brachold X-Patchwork-Id: 12716 Received: from n114-102.dsl.de.inter.net ([213.73.114.102] helo=wopr.deltab.de) by mail.linuxtv.org with esmtp (Exim 4.63) (envelope-from ) id 1LtoZg-0004NB-I8 for vdr@linuxtv.org; Tue, 14 Apr 2009 21:45:41 +0200 Received: from andreas by wopr.deltab.de with local (Exim 4.69) (envelope-from ) id 1LtoZ8-0003gA-OM for vdr@linuxtv.org; Tue, 14 Apr 2009 21:45:06 +0200 From: Andreas Brachold To: VDR Mailing List In-Reply-To: <49E4DC48.4050609@needful.de> References: <1239634726.4330.6.camel@wopr.deltab.de> <002501c9bd26$ebd12910$c3737b30$@de> <49E4DC48.4050609@needful.de> Date: Tue, 14 Apr 2009 21:45:06 +0200 Message-Id: <1239738306.3696.74.camel@wopr.deltab.de> Mime-Version: 1.0 X-Mailer: Evolution 2.24.5 X-LSpam-Score: -2.5 (--) X-LSpam-Report: No, score=-2.5 required=5.0 tests=AWL=0.000, BAYES_00=-2.599, RDNS_DYNAMIC=0.1 autolearn=no Subject: Re: [vdr] [Announce] xxv-1.3 - Feature release (1.4 rc) X-BeenThere: vdr@linuxtv.org X-Mailman-Version: 2.1.9 Precedence: list Reply-To: VDR Mailing List List-Id: VDR Mailing List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Apr 2009 19:45:41 -0000 Status: O X-Status: X-Keywords: X-UID: 20074 Hello, Am Dienstag, den 14.04.2009, 20:56 +0200 schrieb Marco Göbenich: > I saw this behavior too, seems that xxv does not like empty recordings > (dirs). You are right, i fixed that with this patch. (apply inside directory lib/XXV/MODULES ) Andreas --- RECORDS.pm.bak +++ RECORDS.pm @@ -918,7 +918,11 @@ } else { $self->{CapacityFree} = int($totalFree * 3600 / 2000); # use 2GB at one hour as base } - $self->{CapacityPercent} = ($totalSpace * 100 / ($totalFree + $totalSpace)); + if(($totalFree + $totalSpace) > 1) { + $self->{CapacityPercent} = ($totalSpace * 100 / ($totalFree + $totalSpace)); + } else { + $self->{CapacityPercent} = 0; + }