Hi,

I find the creation of the index file a bit annoying, because usually, I
just load a recorded movie, cut out the commercials, export the result
and I'm done. So, there's no real use for me, having an index file.
Additionally, I have to remove the unnecessary *.idx file.

Attached is a small patch, which enables dvbcut to get by without
creating an index file. The creation is controlled via the settings
file:

create_index_file=true or create_index_file=false

Regards, Olaf
diff --git a/src/dvbcut.cpp b/src/dvbcut.cpp
index f4d98f5..2df94e4 100644
--- a/src/dvbcut.cpp
+++ b/src/dvbcut.cpp
@@ -1871,6 +1871,7 @@ void dvbcut::open(std::list<std::string> filenames, std::string idxfilename, std
     return;
   }
 
+  if (settings().create_index_file) {
   if (idxfilename.empty()) {
     idxfilename = filename + ".idx";
     if (!nogui) {
@@ -1905,6 +1906,7 @@ void dvbcut::open(std::list<std::string> filenames, std::string idxfilename, std
   }
 
   make_canonical(idxfilename);
+  }
 
   pictures=-1;
 
diff --git a/src/settings.cpp b/src/settings.cpp
index df98ef7..9a26ad1 100644
--- a/src/settings.cpp
+++ b/src/settings.cpp
@@ -239,6 +239,7 @@ dvbcut_settings::load_settings() {
   endGroup();	// labels
   start_bof = readBoolEntry("/start_bof", true);
   stop_eof = readBoolEntry("/stop_eof", true);
+  create_index_file = readBoolEntry("create_index_file", true);
   beginGroup("/snapshots");
     snapshot_type = readEntry("/type", "PNG");
     snapshot_quality = readNumEntry("/quality", -1);
@@ -362,6 +363,7 @@ dvbcut_settings::save_settings() {
   endGroup();	// labels
   writeEntry("/start_bof", start_bof);
   writeEntry("/stop_eof", stop_eof);
+  writeEntry("/create_index_file", create_index_file);
   beginGroup("/snapshots");
     writeEntry("/type", snapshot_type);
     writeEntry("/quality", snapshot_quality);
diff --git a/src/settings.h b/src/settings.h
index 6d4a352..7cce91d 100644
--- a/src/settings.h
+++ b/src/settings.h
@@ -88,6 +88,7 @@ public:
   int frameseq_nframes;
   QString frameseq_start_distance;
   QString frameseq_distances;
+  bool create_index_file;
 };
 
 // access function
------------------------------------------------------------------------------
Come build with us! The BlackBerry&reg; Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9&#45;12, 2009. Register now&#33;
http://p.sf.net/sfu/devconf
_______________________________________________
DVBCUT-devel mailing list
DVBCUT-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dvbcut-devel

Reply via email to