mirror of
https://github.com/NNTmux/newznab-tmux.git
synced 2026-09-02 03:08:53 +00:00
Add thumbnail creation setting by kevin123.Ported from nZEDb.
This commit is contained in:
@@ -0,0 +1,2 @@
|
||||
INSERT INTO `site` (`setting`, `value`) VALUES ('processthumbnails', '0');
|
||||
UPDATE `tmux` SET `value` = '148' WHERE `setting` = 'sqlpatch';
|
||||
@@ -112,7 +112,7 @@ class TmuxOutput extends Tmux
|
||||
$buffer = '';
|
||||
$state = ($this->runVar['settings']['is_running'] == 1) ? 'Running' : 'Disabled';
|
||||
//$version = $this->_tvers . 'r' . $this->_vers;
|
||||
$tversion = '0.6r0252';
|
||||
$tversion = '0.6r0255';
|
||||
|
||||
$buffer .= sprintf($this->tmpMasks[2],
|
||||
"Monitor $state v$tversion @ $this->_tvers [" . $this->_vers ."]: ",
|
||||
|
||||
@@ -135,6 +135,11 @@ class ProcessAdditional
|
||||
*/
|
||||
protected $_minSize;
|
||||
|
||||
/**
|
||||
* @var bool
|
||||
*/
|
||||
protected $_processThumbnails;
|
||||
|
||||
/**
|
||||
* @var bool
|
||||
*/
|
||||
@@ -362,10 +367,15 @@ class ProcessAdditional
|
||||
|
||||
$this->_addPAR2Files = ($this->site->addpar2 === '0') ? false : true;
|
||||
|
||||
$this->_processSample = ($this->site->ffmpegpath == '' ? false : true);
|
||||
$this->_processVideo = ($this->site->processvideos == 0) ? false : true;
|
||||
if (!$this->site->ffmpegpath) {
|
||||
$this->_processAudioSample = $this->_processThumbnails = $this->_processVideo = false;
|
||||
} else {
|
||||
$this->_processAudioSample = ($this->site->processaudiosample == 0) ? false : true;
|
||||
$this->_processThumbnails = ($this->site->processthumbnails == 0 ? false : true);
|
||||
$this->_processVideo = ($this->site->processvideos == 0) ? false : true;
|
||||
}
|
||||
|
||||
$this->_processJPGSample = ($this->site->processjpg == 0) ? false : true;
|
||||
$this->_processAudioSample = ($this->site->saveaudiopreview == 0) ? false : true;
|
||||
$this->_processMediaInfo = ($this->site->mediainfopath == '') ? false : true;
|
||||
$this->_processAudioInfo = $this->_processMediaInfo;
|
||||
$this->_processPasswords = (
|
||||
@@ -584,7 +594,7 @@ class ProcessAdditional
|
||||
}
|
||||
|
||||
if ($this->_processPasswords === true ||
|
||||
$this->_processSample === true ||
|
||||
$this->_processThumbnails === true ||
|
||||
$this->_processMediaInfo === true ||
|
||||
$this->_processAudioInfo === true ||
|
||||
$this->_processVideo === true
|
||||
@@ -761,7 +771,7 @@ class ProcessAdditional
|
||||
}
|
||||
|
||||
// Look for a video sample, make sure it's not an image.
|
||||
if ($this->_processSample === true &&
|
||||
if ($this->_processThumbnails === true &&
|
||||
empty($this->_sampleMessageIDs) &&
|
||||
preg_match('/sample/i', $this->_currentNZBFile['title']) &&
|
||||
!preg_match('/\.jpe?g/i', $this->_currentNZBFile['title'])
|
||||
@@ -1846,7 +1856,7 @@ class ProcessAdditional
|
||||
*/
|
||||
protected function _getSample($fileLocation)
|
||||
{
|
||||
if (!$this->_processSample) {
|
||||
if (!$this->_processThumbnails) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -2475,7 +2485,7 @@ class ProcessAdditional
|
||||
$this->_foundAudioInfo = ($this->_processAudioInfo ? false : true);
|
||||
$this->_foundAudioSample = ($this->_processAudioSample ? false : true);
|
||||
$this->_foundJPGSample = ($this->_processJPGSample ? false : true);
|
||||
$this->_foundSample = ($this->_processSample ? false : true);
|
||||
$this->_foundSample = ($this->_processThumbnails ? false : true);
|
||||
$this->_foundSample = (($this->_release['disablepreview'] == 1) ? true : false);
|
||||
$this->_foundPAR2Info = false;
|
||||
|
||||
|
||||
@@ -307,14 +307,17 @@
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td><label for="ffmpegpath">Ffmpeg Path</label>:</td>
|
||||
<td>
|
||||
<input id="ffmpegpath" class="long" name="ffmpegpath" type="text" value="{$fsite->ffmpegpath}" />
|
||||
<div class="hint">The path to the <a href="http://www.ffmpeg.org/">ffmpeg</a> binary. Used for thumbnailing. Use empty path to disable thumbnailing.
|
||||
<br/>Use forward slashes in windows <span style="font-family:courier;">c:/path/to/ffmpeg.exe</span></div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="width:180px;"><label for="ffmpegpath">FFmpeg or Avconv Path:</label></td>
|
||||
<td>
|
||||
<input id="ffmpegpath" class="long" name="ffmpegpath" type="text" value="{$fsite->ffmpegpath}"/>
|
||||
<div class="hint">The path to the <a href="http://www.ffmpeg.org/">ffmpeg</a> or <a
|
||||
href="https://libav.org/">avconv</a> binary. Used for making thumbnails and video/audio
|
||||
previews.
|
||||
<br/>Use forward slashes in windows <span style="font-family:courier;">c:/path/to/ffmpeg.exe</span>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td><label for="lamepath">Lame Path</label>:</td>
|
||||
@@ -1129,6 +1132,14 @@
|
||||
usually on XXX releases.<br/></div>
|
||||
</td>
|
||||
</tr>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="width:180px;"><label for="processthumbnails">Process Video Thumbnails:</label></td>
|
||||
<td>
|
||||
{html_radios id="processthumbnails" name='processthumbnails' values=$yesno_ids output=$yesno_names selected=$fsite->processthumbnails separator='<br />'}
|
||||
<div class="hint">Whether to attempt to process a video thumbnail image. You must have ffmpeg for this.<br/></div>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td style="width:180px;"><label for="processvideos">Process Video Samples:</label></td>
|
||||
|
||||
Reference in New Issue
Block a user