Index: i18n/mythfrontend_de.ts
===================================================================
--- i18n/mythfrontend_de.ts (Revision 18905)
+++ i18n/mythfrontend_de.ts (Arbeitskopie)
@@ -8392,6 +8392,10 @@
Bestimmt die Methode mit der MyhTV den Beginn und das Ende eines Werbeblocks sucht.
+ Minimum commercial skip (in seconds)
+ Minimale Werbeblock Sprunglänge (in Sek.)
+
+ Maximum commercial skip (in seconds)Maximale Werbeblock Sprunglänge (in Sek.)
@@ -9016,6 +9020,10 @@
Das Audio-Ausgabegerät um AC3- und DTS-Ton durchzuleiten. Bei "Standard" wird das "Audio-Ausgabegerät" verwendet. Diese Einstellung kann momentan nur bei Tonausgabe über ALSA genutzt werden.
+ Commercial skipping will only skip commercials longer than this limit. This will also affect automatic commercial skipping.
+ Werbeblocksprünge werden nur ausgeführt für Werbeblöcke die länger als das Limit sind. Dies betrifft auch automatische Werbeblocksprünge.
+
+ MythTV will discourage long manual commercial skips. Skips which are longer than this will require the user to hit the SKIP key twice. Automatic commercial skipping is not affected by this limit.MythTV wird von langen manuellen Werbeblocksprüngen Abstand nehmen. Werbesprünge, die länger als dieser Wert sind, müssen mit einem weiteren Tastendruck (SKIP-Taste) wiederholt werden. Automatische Werbesprünge sind hiervon nicht betroffen.
Index: libs/libmythtv/NuppelVideoPlayer.cpp
===================================================================
--- libs/libmythtv/NuppelVideoPlayer.cpp (Revision 18905)
+++ libs/libmythtv/NuppelVideoPlayer.cpp (Arbeitskopie)
@@ -6170,11 +6170,20 @@
.arg(framesPlayed).arg(commBreakIter.key()));
++commBreakIter;
+
+ int minskip = gContext->GetNumSetting("MinimumCommercialSkip", 0);
+ int skipped_seconds = (int)((commBreakIter.key() -
+ framesPlayed) / video_frame_rate);
MergeShortCommercials();
- if (commBreakIter == commBreakMap.end())
+ if (abs(skipped_seconds) <= minskip)
{
+ VERBOSE(VB_COMMFLAG, LOC + "AutoCommercialSkip(), "
+ "skipped_seconds smaller than minskip, will not skip.");
+ }
+ else if (commBreakIter == commBreakMap.end())
+ {
VERBOSE(VB_COMMFLAG, LOC + "AutoCommercialSkip(), at "
"end of commercial break list, will not skip.");
}
@@ -6198,8 +6207,6 @@
if (osd)
{
QString comm_msg;
- int skipped_seconds = (int)((commBreakIter.key() -
- framesPlayed) / video_frame_rate);
QString skipTime;
skipTime.sprintf("%d:%02d", skipped_seconds / 60,
abs(skipped_seconds) % 60);
@@ -6386,6 +6393,7 @@
{
int skipped_seconds = (int)((commBreakIter.key() -
framesPlayed) / video_frame_rate);
+ int minskip = gContext->GetNumSetting("MinimumCommercialSkip", 0);
int maxskip = gContext->GetNumSetting("MaximumCommercialSkip", 3600);
QString skipTime;
skipTime.sprintf("%d:%02d", skipped_seconds / 60,
@@ -6393,7 +6401,8 @@
struct StatusPosInfo posInfo;
calcSliderPos(posInfo);
if ((lastIgnoredManualSkip.secsTo(QDateTime::currentDateTime()) > 3) &&
- (abs(skipped_seconds) >= maxskip))
+ ((abs(skipped_seconds) <= minskip) ||
+ (abs(skipped_seconds) >= maxskip)))
{
osd->ShowStatus(posInfo, false,
QObject::tr("Too Far %1").arg(skipTime), 2);
Index: programs/mythfrontend/globalsettings.cpp
===================================================================
--- programs/mythfrontend/globalsettings.cpp (Revision 18905)
+++ programs/mythfrontend/globalsettings.cpp (Arbeitskopie)
@@ -574,6 +574,17 @@
return gs;
}
+static GlobalSpinBox *MinimumCommercialSkip()
+{
+ GlobalSpinBox *bs = new GlobalSpinBox("MinimumCommercialSkip", 0, 3600, 10);
+ bs->setLabel(QObject::tr("Minimum commercial skip (in seconds)"));
+ bs->setHelpText(QObject::tr("Commercial skipping will only skip commercials "
+ "longer than this limit. This will also affect automatic "
+ "commercial skipping."));
+ bs->setValue(0);
+ return bs;
+}
+
static GlobalSpinBox *MaximumCommercialSkip()
{
GlobalSpinBox *bs = new GlobalSpinBox("MaximumCommercialSkip", 0, 3600, 10);
@@ -4748,6 +4759,7 @@
comms->addChild(AutoCommercialSkip());
comms->addChild(CommRewindAmount());
comms->addChild(CommNotifyAmount());
+ comms->addChild(MinimumCommercialSkip());
comms->addChild(MaximumCommercialSkip());
comms->addChild(MergeShortCommBreaks());
comms->addChild(CommSkipAllBlanks());