From patchwork Tue Mar 22 09:18:46 2005 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexander Riedel X-Patchwork-Id: 11819 Received: from mailout11.sul.t-online.com ([194.25.134.85]) by www.linuxtv.org with esmtp (Exim 4.34) id 1DDfei-0005Oh-M8 for vdr@linuxtv.org; Tue, 22 Mar 2005 10:26:32 +0100 Received: from fwd26.aul.t-online.de by mailout11.sul.t-online.com with smtp id 1DDfep-0006J5-01; Tue, 22 Mar 2005 10:26:39 +0100 Received: from [192.168.2.100] (GolXbgZ-gebUS9xuPlb38Z3gFWgd-g285ojc4zx4bhlrMrO-ArrFE-@[84.174.233.197]) by fwd26.sul.t-online.de with esmtp id 1DDfeY-0aU0JM0; Tue, 22 Mar 2005 10:26:22 +0100 Message-ID: <423FE2F6.2030509@t-online.de> Date: Tue, 22 Mar 2005 10:18:46 +0100 From: Alexander Riedel User-Agent: Mozilla Thunderbird 1.0 (X11/20041206) X-Accept-Language: en-us, en MIME-Version: 1.0 To: vdr@linuxtv.org, Klaus.Schmidinger@cadsoft.de Subject: [vdr] [PATCH] Mehrere Video Directorys X-ID: GolXbgZ-gebUS9xuPlb38Z3gFWgd-g285ojc4zx4bhlrMrO-ArrFE- X-TOI-MSGID: 28e2e791-be47-4aeb-9973-2cb988a67e7f X-BeenThere: vdr@linuxtv.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Klaus Schmidinger's VDR List-Id: Klaus Schmidinger's VDR List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 22 Mar 2005 09:26:33 -0000 Status: O X-Status: X-Keywords: X-UID: 952 Hallo an alle ! Hallo Klaus !! Habe heute versucht vdr mit mehreren video directories zu nutzen. -v /video0 In recordings habe ich aber nur Aufnahmen von /video0 gehabt. hier ist kleines Patch: diff -Nu ./vdr-1.3.22.orig/recording.c ./vdr/recording.c --- ./vdr-1.3.22.orig/recording.c 2005-02-12 11:17:47.000000000 +0100 +++ ./vdr/recording.c 2005-03-22 09:37:52.000000000 +0100 @@ -671,9 +671,14 @@ bool cRecordings::Load(void) { + cVideoDirectory Dir; lastUpdate = time(NULL); // doing this first to make sure we don't miss anything Clear(); - ScanVideoDir(VideoDirectory); + + do { + ScanVideoDir(Dir.Name()); + }while(Dir.Next()); + Sort(); return Count() > 0; } diff -Nu ./vdr-1.3.22.orig/videodir.c ./vdr/videodir.c --- ./vdr-1.3.22.orig/videodir.c 2004-12-26 12:52:12.000000000 +0100 +++ ./vdr/videodir.c 2005-03-22 09:46:06.000000000 +0100 @@ -20,23 +20,6 @@ const char *VideoDirectory = VIDEODIR; -class cVideoDirectory { -private: - char *name, *stored, *adjusted; - int length, number, digits; -public: - cVideoDirectory(void); - ~cVideoDirectory(); - int FreeMB(int *UsedMB = NULL); - const char *Name(void) { return name ? name : VideoDirectory; } - const char *Stored(void) { return stored; } - int Length(void) { return length; } - bool IsDistributed(void) { return name != NULL; } - bool Next(void); - void Store(void); - const char *Adjust(const char *FileName); - }; - cVideoDirectory::cVideoDirectory(void) { length = strlen(VideoDirectory); diff -Nu ./vdr-1.3.22.orig/videodir.h ./vdr/videodir.h --- ./vdr-1.3.22.orig/videodir.h 2004-12-26 12:52:56.000000000 +0100 +++ ./vdr/videodir.h 2005-03-22 09:32:16.000000000 +0100 @@ -15,6 +15,23 @@ extern const char *VideoDirectory; +class cVideoDirectory { +private: + char *name, *stored, *adjusted; + int length, number, digits; +public: + cVideoDirectory(void); + ~cVideoDirectory(); + int FreeMB(int *UsedMB = NULL); + const char *Name(void) { return name ? name : VideoDirectory; } + const char *Stored(void) { return stored; } + int Length(void) { return length; } + bool IsDistributed(void) { return name != NULL; } + bool Next(void); + void Store(void); + const char *Adjust(const char *FileName); +}; + int OpenVideoFile(const char *FileName, int Flags); int CloseVideoFile(int FileHandle); bool RenameVideoFile(const char *OldName, const char *NewName);