Project

General

Profile

Feature #440 ยป disable_archives.diff

Anonymous, 10/09/2010 12:50 PM

View differences:

vdr-plugin-extrecmenu.patched/Makefile 2010-10-09 12:41:44.049276477 +0200
DEFINES += -DUSE_PINPLUGIN
endif
ifdef DISABLE_ARCHIVE
DEFINES += -DDISABLE_ARCHIVE
endif
### The version number of VDR's plugin API (taken from VDR's "config.h"):
APIVERSION = $(shell sed -ne '/define APIVERSION/s/^.*"\(.*\)".*$$/\1/p' $(VDRDIR)/config.h)
vdr-plugin-extrecmenu.patched/mymenurecordings.c 2010-10-09 12:40:15.023224943 +0200
myMenuRecordingsItem::myMenuRecordingsItem(cRecording *Recording,int Level)
{
totalentries=newentries=0;
#ifndef DISABLE_ARCHIVE
isdvd=false;
ishdd=false;
#endif
dirismoving=true;
name=NULL;
filename=Recording->FileName();
......
else
buffer+="/00001.ts";
#ifndef DISABLE_ARCHIVE
if(access(buffer.c_str(),R_OK))
{
buffer=filename;
......
buffer+="/hdd.vdr";
ishdd=!access(buffer.c_str(),R_OK);
}
#endif
if(MoveCutterThread->IsMoving(filename))
titlebuffer << Icons::MovingRecording(); // moving recording
#ifndef DISABLE_ARCHIVE
else if(isdvd)
titlebuffer << Icons::DVD(); // archive dvd
else if(ishdd)
titlebuffer << Icons::HDD(); // archive hdd
#endif
else if(MoveCutterThread->IsCutting(filename))
titlebuffer << Icons::Scissor(); // cutting recording
else if(Recording->IsNew() && !mysetup.PatchNew)
......
#define MB_PER_MINUTE 25.75 // this is just an estimate! (taken over from VDR)
bool myMenuRecordings::golastreplayed=false;
#ifndef DISABLE_ARCHIVE
bool myMenuRecordings::wasdvd;
bool myMenuRecordings::washdd;
#endif
dev_t myMenuRecordings::fsid=0;
int myMenuRecordings::freediskspace=0;
......
Display();
#ifndef DISABLE_ARCHIVE
if(wasdvd&&!cControl::Control())
{
char *cmd=NULL;
......
washdd=false;
}
#endif
Set();
......
if(recitem && !recitem->IsDirectory() && !cControl::Control() && !mysetup.GoLastReplayed)
golastreplayed=false;
}
#ifdef DISABLE_ARCHIVE
if(recitem&&!recitem->IsDirectory()&&!cControl::Control())
#else
if(recitem&&!recitem->IsDirectory()&&(recitem->IsDVD()||recitem->IsHDD())&&!cControl::Control())
#endif
cReplayControl::ClearLastReplayed(cReplayControl::LastReplayed());
}
}
......
cRecording *recording=GetRecording(item);
if(recording)
{
#ifndef DISABLE_ARCHIVE
if(item->IsHDD())
{
char hddnr[BUFSIZ];
......
}
buffer=NULL;
}
#endif
golastreplayed=true;
myReplayControl::SetRecording(recording->FileName(),recording->Title());
cControl::Shutdown();
......
if(edit)
{
myMenuRecordingsItem *item=(myMenuRecordingsItem*)Get(Current());
#ifndef DISABLE_ARCHIVE
if(Key==kRed || Key==kGreen || Key==kYellow || (!item->IsDVD() && !item->IsHDD() && Key==kBlue) || Key==kBack)
#endif
{
edit=false;
helpkeys=-1;
......
case kRed: return Rename();
case kGreen: return MoveRec();
case kYellow: return Delete();
#ifdef DISABLE_ARCHIVE
case kBlue: return Details();
#else
case kBlue: if(item&&!item->IsDVD()&&!item->IsHDD())
return Details();
else
break;
#endif
case kBack: SetHelpKeys();
default: break;
}
......
else
{
edit=true;
#ifdef DISABLE_ARCHIVE
SetHelp(tr("Button$Rename"),tr("Button$Move"),tr("Button$Delete"),tr("Details"));
#else
SetHelp(tr("Button$Rename"),tr("Button$Move"),tr("Button$Delete"),!item->IsDVD()&&!item->IsHDD()?tr("Details"):NULL);
#endif
}
}
}
vdr-plugin-extrecmenu.patched/mymenurecordings.h 2010-10-09 12:18:39.000514924 +0200
{
private:
bool dirismoving;
#ifndef DISABLE_ARCHIVE
bool isdvd;
bool ishdd;
#endif
bool isPesRecording;
int level,isdirectory;
int totalentries,newentries;
......
bool IsDirectory(){return name!=NULL;}
bool IsPesRecording(void) const { return isPesRecording; }
void IncrementCounter(bool IsNew);
#ifndef DISABLE_ARCHIVE
bool IsDVD(){return isdvd;}
bool IsHDD(){return ishdd;}
#endif
void SetDirIsMoving(bool moving){dirismoving=moving;}
bool GetDirIsMoving(){return dirismoving;}
const char *UniqID(){return uniqid.length()?uniqid.c_str():"";}
......
{
private:
bool edit;
#ifndef DISABLE_ARCHIVE
static bool wasdvd;
static bool washdd;
#endif
static bool golastreplayed;
static dev_t fsid;
static int freediskspace;
vdr-plugin-extrecmenu.patched/tools.h 2010-10-09 12:15:41.226225878 +0200
public:
static void InitCharSet();
static const char* Continue(){return IsUTF8?"\ue000":"\x80";}
#ifndef DISABLE_ARCHIVE
static const char* DVD(){return IsUTF8?"\ue001":"\x81";}
#endif
static const char* Directory(){return IsUTF8?"\ue002":"\x82";}
static const char* FixedBlank(){return IsUTF8?"\ue003":"\x83";}
static const char* Scissor(){return IsUTF8?"\ue004":"\x84";}
......
static const char* New(){return IsUTF8?"\ue010":"\x90";}
static const char* Repititive_timer(){return IsUTF8?"\ue011":"\x91";}
static const char* Running(){return IsUTF8?"\ue012":"\x92";}
#ifndef DISABLE_ARCHIVE
static const char* HDD(){return IsUTF8?"\ue01c":"\x9c";}
#endif
static const char* StarFull(){return IsUTF8?"\ue018":"\x98";}
static const char* StarHalf(){return IsUTF8?"\ue019":"\x99";}
};
    (1-1/1)