Ticket #5863: min_comm_skip.diff
File min_comm_skip.diff, 5.9 KB (added by , 16 years ago) |
---|
-
i18n/mythfrontend_de.ts
8392 8392 <translation>Bestimmt die Methode mit der MyhTV den Beginn und das Ende eines Werbeblocks sucht.</translation> 8393 8393 </message> 8394 8394 <message> 8395 <source>Minimum commercial skip (in seconds)</source> 8396 <translation>Minimale Werbeblock SprunglÀnge (in Sek.)</translation> 8397 </message> 8398 <message> 8395 8399 <source>Maximum commercial skip (in seconds)</source> 8396 8400 <translation>Maximale Werbeblock SprunglÀnge (in Sek.)</translation> 8397 8401 </message> … … 9016 9020 <translation>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.</translation> 9017 9021 </message> 9018 9022 <message> 9023 <source>Commercial skipping will only skip commercials longer than this limit. This will also affect automatic commercial skipping.</source> 9024 <translation>WerbeblocksprÃŒnge werden nur ausgefÃŒhrt fÃŒr Werbeblöcke die lÀnger als das Limit sind. Dies betrifft auch automatische WerbeblocksprÃŒnge.</translation> 9025 </message> 9026 <message> 9019 9027 <source>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.</source> 9020 9028 <translation>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.</translation> 9021 9029 </message> -
libs/libmythtv/NuppelVideoPlayer.cpp
6170 6170 .arg(framesPlayed).arg(commBreakIter.key())); 6171 6171 6172 6172 ++commBreakIter; 6173 6174 int minskip = gContext->GetNumSetting("MinimumCommercialSkip", 180); 6175 int skipped_seconds = (int)((commBreakIter.key() - 6176 framesPlayed) / video_frame_rate); 6173 6177 6174 6178 MergeShortCommercials(); 6175 6179 6176 if ( commBreakIter == commBreakMap.end())6180 if (abs(skipped_seconds) <= minskip) 6177 6181 { 6182 VERBOSE(VB_COMMFLAG, LOC + "AutoCommercialSkip(), " 6183 "skipped_seconds smaller than minskip, will not skip."); 6184 6185 if (osd) 6186 { 6187 QString comm_msg; 6188 QString skipTime; 6189 skipTime.sprintf("%d:%02d", skipped_seconds / 60, 6190 abs(skipped_seconds) % 60); 6191 comm_msg = QString(QObject::tr("Too Far %1")) 6192 .arg(skipTime); 6193 struct StatusPosInfo posInfo; 6194 calcSliderPos(posInfo); 6195 osd->ShowStatus(posInfo, false, comm_msg, 2); 6196 } 6197 } 6198 else if (commBreakIter == commBreakMap.end()) 6199 { 6178 6200 VERBOSE(VB_COMMFLAG, LOC + "AutoCommercialSkip(), at " 6179 6201 "end of commercial break list, will not skip."); 6180 6202 } … … 6198 6220 if (osd) 6199 6221 { 6200 6222 QString comm_msg; 6201 int skipped_seconds = (int)((commBreakIter.key() -6202 framesPlayed) / video_frame_rate);6203 6223 QString skipTime; 6204 6224 skipTime.sprintf("%d:%02d", skipped_seconds / 60, 6205 6225 abs(skipped_seconds) % 60); … … 6386 6406 { 6387 6407 int skipped_seconds = (int)((commBreakIter.key() - 6388 6408 framesPlayed) / video_frame_rate); 6409 int minskip = gContext->GetNumSetting("MinimumCommercialSkip", 0); 6389 6410 int maxskip = gContext->GetNumSetting("MaximumCommercialSkip", 3600); 6390 6411 QString skipTime; 6391 6412 skipTime.sprintf("%d:%02d", skipped_seconds / 60, … … 6393 6414 struct StatusPosInfo posInfo; 6394 6415 calcSliderPos(posInfo); 6395 6416 if ((lastIgnoredManualSkip.secsTo(QDateTime::currentDateTime()) > 3) && 6396 (abs(skipped_seconds) >= maxskip)) 6417 ((abs(skipped_seconds) <= minskip) || 6418 (abs(skipped_seconds) >= maxskip))) 6397 6419 { 6398 6420 osd->ShowStatus(posInfo, false, 6399 6421 QObject::tr("Too Far %1").arg(skipTime), 2); -
programs/mythfrontend/globalsettings.cpp
574 574 return gs; 575 575 } 576 576 577 static GlobalSpinBox *MinimumCommercialSkip() 578 { 579 GlobalSpinBox *bs = new GlobalSpinBox("MinimumCommercialSkip", 0, 3600, 10); 580 bs->setLabel(QObject::tr("Minimum commercial skip (in seconds)")); 581 bs->setHelpText(QObject::tr("Commercial skipping will only skip commercials " 582 "longer than this limit. This will also affect automatic " 583 "commercial skipping.")); 584 bs->setValue(0); 585 return bs; 586 } 587 577 588 static GlobalSpinBox *MaximumCommercialSkip() 578 589 { 579 590 GlobalSpinBox *bs = new GlobalSpinBox("MaximumCommercialSkip", 0, 3600, 10); … … 4748 4759 comms->addChild(AutoCommercialSkip()); 4749 4760 comms->addChild(CommRewindAmount()); 4750 4761 comms->addChild(CommNotifyAmount()); 4762 comms->addChild(MinimumCommercialSkip()); 4751 4763 comms->addChild(MaximumCommercialSkip()); 4752 4764 comms->addChild(MergeShortCommBreaks()); 4753 4765 comms->addChild(CommSkipAllBlanks());