summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Prochnow <nordlicht@martins-kabuff.de>2007-01-01 19:14:13 +0100
committerAndreas Mair <andreas@vdr-developer.org>2007-01-01 19:14:13 +0100
commit074a396ce9f5c5239dd790c6566e0f19dff45f59 (patch)
treeb24fb923a1ec7172a481a9550504549db43540f0
parent01be0f47d4fcfce954f77a037f8ab4d5368c8fe7 (diff)
downloadvdr-plugin-extrecmenu-074a396ce9f5c5239dd790c6566e0f19dff45f59.tar.gz
vdr-plugin-extrecmenu-074a396ce9f5c5239dd790c6566e0f19dff45f59.tar.bz2
Version 0.12cv0.12c
- dvd id for archive dvd would be first read out when the corresponding entry is selected; this should prevent delays while opening the plugin - because of this the setup option "show dvd id" is removed
-rw-r--r--HISTORY15
-rw-r--r--extrecmenu.c4
-rw-r--r--i18n.c22
-rw-r--r--mymenueditrecording.c2
-rw-r--r--mymenurecordings.c185
-rw-r--r--mymenurecordings.h4
-rw-r--r--mymenusetup.c4
-rw-r--r--mymenusetup.h2
8 files changed, 96 insertions, 142 deletions
diff --git a/HISTORY b/HISTORY
index 4934058..ca4c3dc 100644
--- a/HISTORY
+++ b/HISTORY
@@ -1,19 +1,24 @@
VDR Plugin 'extrecmenu' Revision History
----------------------------------------
-2006-04-12: Version 0.12b
+2006-12-31: Version 0.12c
+- dvd id for archive dvd would be first read out when the corresponding entry
+ is selected; this should prevent delays while opening the plugin
+- because of this the setup option "show dvd id" is removed
+
+2006-12-04: Version 0.12b
- type of sorting (ascending/descending) selectable at the setup menu of the
plugin
- 'Blue' also closes the info menu for a recording
-2006-19-06: Version 0.12a
+2006-06-19: Version 0.12a
- fixed a bug if you compiled the plugin with support for the PIN-plugin;
thanks to Thiemo Gehrke for reporting
- fixed another bug with editing recordings if VDR is compiled with VFAT=1 or
started with the option --vfat; based upon a patch of berndm from
vdr-portal.de
-2006-11-06: Version 0.12
+2006-06-11: Version 0.12
- reworked layout
- added possibility to set sorting mode for each directory
- if you use the PIN-plugin, ExtRecMenu works together with it to protect
@@ -22,7 +27,7 @@ VDR Plugin 'extrecmenu' Revision History
have special chars in their names if VDR is compiled with VFAT=1 or startet
with the option --vfat
-2006-28-05: Version 0.11
+2006-05-28: Version 0.11
- added czech translation; thanks to Vladimír Bárta
- added missing dialog for video dvds
- added more meaningful error messages
@@ -42,7 +47,7 @@ VDR Plugin 'extrecmenu' Revision History
directories
- plugins closes if there are no recordings - fixed
-2006-02-05: Version 0.10
+2006-05-02: Version 0.10
- made changes to Makefile for APIVERSION (VDR >= 1.3.47)
- changed myReplayControl; suggested by Thomas Günther
- added display of free disk space to the title bar
diff --git a/extrecmenu.c b/extrecmenu.c
index eff656b..87c0321 100644
--- a/extrecmenu.c
+++ b/extrecmenu.c
@@ -8,7 +8,7 @@
#include "i18n.h"
#include "tools.h"
-static const char *VERSION = "0.12b";
+static const char *VERSION = "0.12c";
static const char *DESCRIPTION = "Extended recordings menu";
static const char *MAINMENUENTRY = "ExtRecMenu";
@@ -107,8 +107,6 @@ bool cPluginExtrecmenu::SetupParse(const char *Name,const char *Value)
mysetup.ReplaceOrgRecMenu=atoi(Value);
else if(!strcasecmp(Name,"PatchNew"))
mysetup.PatchNew=atoi(Value);
- else if(!strcasecmp(Name,"ShowDvdNr"))
- mysetup.ShowDvdNr=atoi(Value);
else if(!strcasecmp(Name,"ShowNewRecs"))
mysetup.ShowNewRecs=atoi(Value);
else if(!strcasecmp(Name,"DescendSorting"))
diff --git a/i18n.c b/i18n.c
index 78e52f3..2e0afaa 100644
--- a/i18n.c
+++ b/i18n.c
@@ -533,28 +533,6 @@ const tI18nPhrase Phrases[] = {
"",
"Nahrávka nebyla na DVD nalezena!",
},
- { "Show dvd id",
- "DVD-ID anzeigen",
- "",
- "",
- "",
- "",
- "",
- "",
- "Näytä DVD:n tunniste",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "Zobrazit identifikátor DVD",
- },
{ "Script 'dvdarchive.sh' not found!",
"Skript 'dvdarchive.sh' wurde nicht gefunden!",
"",
diff --git a/mymenueditrecording.c b/mymenueditrecording.c
index 55eb3ec..3c89292 100644
--- a/mymenueditrecording.c
+++ b/mymenueditrecording.c
@@ -326,8 +326,6 @@ eOSState myMenuMoveRecording::MoveRec()
if(dir)
dir=ExchangeChars(dir,true);
- printf("dir: %s\n",dir);
-
asprintf(&newname,"%s%s%s%s",VideoDirectory,dir?"/":"",dir?dir:"",strrchr(dirname?oldname:recording->FileName(),'/'));
if(MoveRename(oldname,newname,dirname?NULL:recording,true))
diff --git a/mymenurecordings.c b/mymenurecordings.c
index f59eb4b..7eb996d 100644
--- a/mymenurecordings.c
+++ b/mymenurecordings.c
@@ -85,10 +85,7 @@ myMenuRecordingsItem::myMenuRecordingsItem(cRecording *Recording,int Level)
{
totalentries=newentries=0;
isdvd=false;
- isvideodvd=false;
name=NULL;
-
- strn0cpy(dvdnr,"",sizeof(dvdnr));
filename=Recording->FileName();
// get the level of this recording
@@ -131,27 +128,6 @@ myMenuRecordingsItem::myMenuRecordingsItem(cRecording *Recording,int Level)
// dvdarchive-patch functionality
asprintf(&buffer,"%s/dvd.vdr",filename);
isdvd=!access(buffer,R_OK);
- if(isdvd)
- {
- FILE *f;
- if((f=fopen(buffer,"r"))!=NULL)
- {
- // get the dvd id
- if(fgets(dvdnr,sizeof(dvdnr),f))
- {
- char *p=strchr(dvdnr,'\n');
- if(p)
- *p=0;
- }
- // determine if the dvd is a video dvd
- char tmp[BUFSIZ];
- if(fgets(tmp,sizeof(tmp),f))
- isvideodvd=true;
-
- fclose(f);
- }
- }
- free(buffer);
// marker
titlebuffer=' ';
@@ -204,22 +180,18 @@ myMenuRecordingsItem::myMenuRecordingsItem(cRecording *Recording,int Level)
{
free(buffer);
asprintf(&buffer,"%s/length.vdr",filename);
- haslength=!access(buffer,R_OK);
- if(haslength)
+ FILE *f;
+ if((f=fopen(buffer,"r"))!=NULL)
{
- FILE *f;
- if((f=fopen(buffer,"r"))!=NULL)
+ char buf[8];
+ if(fgets(buf,sizeof(buf),f))
{
- char buf[8];
- if(fgets(buf,sizeof(buf),f))
- {
- char *p=strchr(buf,'\n');
- if(p)
- *p=0;
- }
- fclose(f);
- snprintf(reclength,sizeof(reclength),"%3s'\n",buf);
+ char *p=strchr(buf,'\n');
+ if(p)
+ *p=0;
}
+ fclose(f);
+ snprintf(reclength,sizeof(reclength),"%3s'\n",buf);
}
}
free(buffer);
@@ -233,14 +205,6 @@ myMenuRecordingsItem::myMenuRecordingsItem(cRecording *Recording,int Level)
if(!mysetup.ShowRecDate&&!mysetup.ShowRecTime&&!mysetup.ShowRecLength)
titlebuffer+='\t';
- // dvd id
- if(isdvd&&mysetup.ShowDvdNr)
- {
- titlebuffer+='[';
- titlebuffer+=dvdnr;
- titlebuffer+="]";
- }
-
// recording title
s=strrchr(Recording->Name(),'~');
titlebuffer+=s?s+1:Recording->Name();
@@ -366,7 +330,6 @@ myMenuRecordings::myMenuRecordings(const char *Base,int Level):cOsdMenu(Base?Bas
Set();
-
if(myReplayControl::LastReplayed())
Open();
@@ -533,9 +496,7 @@ bool myMenuRecordings::Open()
free(buffer);
return true;
}
- printf("Open false\n");
- if(item)
- printf("%s\n",item->FileName());
+
return false;
}
@@ -563,63 +524,87 @@ eOSState myMenuRecordings::Play()
{
if(item->IsDVD())
{
- asprintf(&msg,tr("Please insert DVD %s"),item->DvdNr());
- if(Interface->Confirm(msg))
- {
- free(msg);
- // recording is a video dvd
- if(item->IsVideoDVD())
+ bool isvideodvd=false;
+ char dvdnr[BUFSIZ];
+ char *buffer=NULL;
+ FILE *f;
+
+ asprintf(&buffer,"%s/dvd.vdr",recording->FileName());
+ if((f=fopen(buffer,"r"))!=NULL)
{
- cPlugin *plugin=cPluginManager::GetPlugin("dvd");
- if(plugin)
- {
- cOsdObject *osd=plugin->MainMenuAction();
- delete osd;
- osd=NULL;
- return osEnd;
- }
- else
- {
- Skins.Message(mtError,tr("DVD plugin is not installed!"));
- return osContinue;
- }
+ // get the dvd id
+ if(fgets(dvdnr,sizeof(dvdnr),f))
+ {
+ char *p=strchr(dvdnr,'\n');
+ if(p)
+ *p=0;
+ }
+ // determine if dvd is a video dvd
+ char tmp[BUFSIZ];
+ if(fgets(tmp,sizeof(dvdnr),f))
+ isvideodvd=true;
+
+ fclose(f);
}
- // recording is a archive dvd
- else
+ free(buffer);
+
+ asprintf(&msg,tr("Please insert DVD %s"),dvdnr);
+ if(Interface->Confirm(msg))
{
- strcpy(path,recording->FileName());
- name=strrchr(path,'/')+1;
- asprintf(&msg,"dvdarchive.sh mount \"%s\" '%s'",*strescape(path,"'"),*strescape(name,"'\\\"$"));
+ free(msg);
+ // recording is a video dvd
+ if(isvideodvd)
+ {
+ cPlugin *plugin=cPluginManager::GetPlugin("dvd");
+ if(plugin)
+ {
+ cOsdObject *osd=plugin->MainMenuAction();
+ delete osd;
+ osd=NULL;
+ return osEnd;
+ }
+ else
+ {
+ Skins.Message(mtError,tr("DVD plugin is not installed!"));
+ return osContinue;
+ }
+ }
+ // recording is a archive dvd
+ else
+ {
+ strcpy(path,recording->FileName());
+ name=strrchr(path,'/')+1;
+ asprintf(&msg,"dvdarchive.sh mount \"%s\" '%s'",*strescape(path,"'"),*strescape(name,"'\\\"$"));
- isyslog("[extrecmenu] calling %s to mount dvd",msg);
- int result=SystemExec(msg);
- isyslog("[extrecmenu] dvdarchive.sh returns %d",result);
- free(msg);
- if(result)
- {
- result=result/256;
- if(result==1)
- Skins.Message(mtError,tr("Error while mounting DVD!"));
- if(result==2)
- Skins.Message(mtError,tr("No DVD in drive!"));
- if(result==3)
- Skins.Message(mtError,tr("Recording not found on DVD!"));
- if(result==4)
- Skins.Message(mtError,tr("Error while linking [0-9]*.vdr!"));
- if(result==5)
- Skins.Message(mtError,tr("sudo or mount --bind / umount error (vfat system)"));
- if(result==127)
- Skins.Message(mtError,tr("Script 'dvdarchive.sh' not found!"));
+ isyslog("[extrecmenu] calling %s to mount dvd",msg);
+ int result=SystemExec(msg);
+ isyslog("[extrecmenu] dvdarchive.sh returns %d",result);
+ free(msg);
+ if(result)
+ {
+ result=result/256;
+ if(result==1)
+ Skins.Message(mtError,tr("Error while mounting DVD!"));
+ if(result==2)
+ Skins.Message(mtError,tr("No DVD in drive!"));
+ if(result==3)
+ Skins.Message(mtError,tr("Recording not found on DVD!"));
+ if(result==4)
+ Skins.Message(mtError,tr("Error while linking [0-9]*.vdr!"));
+ if(result==5)
+ Skins.Message(mtError,tr("sudo or mount --bind / umount error (vfat system)"));
+ if(result==127)
+ Skins.Message(mtError,tr("Script 'dvdarchive.sh' not found!"));
+ return osContinue;
+ }
+ wasdvd=true;
+ }
+ }
+ else
+ {
+ free(msg);
return osContinue;
- }
- wasdvd=true;
}
- }
- else
- {
- free(msg);
- return osContinue;
- }
}
golastreplayed=true;
myReplayControl::SetRecording(recording->FileName(),recording->Title());
diff --git a/mymenurecordings.h b/mymenurecordings.h
index 694f112..ebaf588 100644
--- a/mymenurecordings.h
+++ b/mymenurecordings.h
@@ -3,8 +3,6 @@ class myMenuRecordingsItem:public cOsdItem
{
private:
bool isdvd;
- bool isvideodvd;
- char dvdnr[BUFSIZ];
int level,isdirectory;
int totalentries,newentries;
char *title;
@@ -18,8 +16,6 @@ class myMenuRecordingsItem:public cOsdItem
bool IsDirectory(){return name!=NULL;}
void IncrementCounter(bool IsNew);
bool IsDVD(){return isdvd;}
- bool IsVideoDVD(){return isvideodvd;}
- char *DvdNr(){return dvdnr;}
};
// --- myMenuRecordings -------------------------------------------------------
diff --git a/mymenusetup.c b/mymenusetup.c
index f35217d..f6cf128 100644
--- a/mymenusetup.c
+++ b/mymenusetup.c
@@ -9,7 +9,6 @@ mySetup::mySetup()
{
mysetup.HideMainMenuEntry=0;
mysetup.PatchNew=1;
- mysetup.ShowDvdNr=0;
mysetup.ReplaceOrgRecMenu=0;
mysetup.ShowRecDate=1;
mysetup.ShowRecTime=1;
@@ -28,7 +27,6 @@ myMenuSetup::myMenuSetup()
showrecdate=mysetup.ShowRecDate;
showrectime=mysetup.ShowRecTime;
showreclength=mysetup.ShowRecLength;
- showdvdnr=mysetup.ShowDvdNr;
shownewrecs=mysetup.ShowNewRecs;
descendsorting=mysetup.DescendSorting;
@@ -43,14 +41,12 @@ myMenuSetup::myMenuSetup()
Add(new cMenuEditBoolItem(tr("Show recording length"),&showreclength));
Add(new cMenuEditBoolItem(tr("Show nr. of new recordings in a directory"),&shownewrecs));
Add(new cMenuEditBoolItem(tr("Show alternative to new marker"),&patchnew));
- Add(new cMenuEditBoolItem(tr("Show dvd id"),&showdvdnr));
}
void myMenuSetup::Store()
{
SetupStore("HideMainMenuEntry",mysetup.HideMainMenuEntry=hidemainmenuentry);
SetupStore("PatchNew",mysetup.PatchNew=patchnew);
- SetupStore("ShowDvdNr",mysetup.ShowDvdNr=showdvdnr);
SetupStore("ReplaceOrgRecMenu",mysetup.ReplaceOrgRecMenu=replaceorgrecmenu);
SetupStore("ShowRecDate",mysetup.ShowRecDate=showrecdate);
SetupStore("ShowRecTime",mysetup.ShowRecTime=showrectime);
diff --git a/mymenusetup.h b/mymenusetup.h
index e029b94..ad0091b 100644
--- a/mymenusetup.h
+++ b/mymenusetup.h
@@ -10,7 +10,6 @@ class mySetup
int HideMainMenuEntry;
int ReplaceOrgRecMenu;
int PatchNew;
- int ShowDvdNr;
int ShowNewRecs;
int DescendSorting;
};
@@ -27,7 +26,6 @@ class myMenuSetup:public cMenuSetupPage
int hidemainmenuentry;
int replaceorgrecmenu;
int patchnew;
- int showdvdnr;
int shownewrecs;
int descendsorting;
protected: