Completed
Push — master ( 86b69c...c0595e )
by
unknown
30:51 queued 14s
created
lib/private/Preview/Movie.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -72,7 +72,7 @@  discard block
 block discarded – undo
72 72
 			$absPath = $this->getLocalFile($file, $size);
73 73
 			if ($absPath === false) {
74 74
 				Server::get(LoggerInterface::class)->error(
75
-					'Failed to get local file to generate thumbnail for: ' . $file->getPath(),
75
+					'Failed to get local file to generate thumbnail for: '.$file->getPath(),
76 76
 					['app' => 'core']
77 77
 				);
78 78
 				return null;
@@ -98,9 +98,9 @@  discard block
 block discarded – undo
98 98
 
99 99
 	private function useHdr(string $absPath): bool {
100 100
 		// load ffprobe path from configuration, otherwise generate binary path using ffmpeg binary path
101
-		$ffprobe_binary = $this->config->getSystemValue('preview_ffprobe_path', null) ?? (pathinfo($this->binary, PATHINFO_DIRNAME) . '/ffprobe');
101
+		$ffprobe_binary = $this->config->getSystemValue('preview_ffprobe_path', null) ?? (pathinfo($this->binary, PATHINFO_DIRNAME).'/ffprobe');
102 102
 		// run ffprobe on the video file to get value of "color_transfer"
103
-		$test_hdr_cmd = [$ffprobe_binary,'-select_streams', 'v:0',
103
+		$test_hdr_cmd = [$ffprobe_binary, '-select_streams', 'v:0',
104 104
 			'-show_entries', 'stream=color_transfer',
105 105
 			'-of', 'default=noprint_wrappers=1:nokey=1',
106 106
 			$absPath];
@@ -127,7 +127,7 @@  discard block
 block discarded – undo
127 127
 
128 128
 		if ($tmpPath === false) {
129 129
 			Server::get(LoggerInterface::class)->error(
130
-				'Failed to get local file to generate thumbnail for: ' . $absPath,
130
+				'Failed to get local file to generate thumbnail for: '.$absPath,
131 131
 				['app' => 'core']
132 132
 			);
133 133
 			return null;
@@ -139,14 +139,14 @@  discard block
 block discarded – undo
139 139
 			if ($this->useHdr($absPath)) {
140 140
 				// Force colorspace to '2020_ncl' because some videos are
141 141
 				// tagged incorrectly as 'reserved' resulting in fail if not forced.
142
-				$cmd = [$this->binary, '-y', '-ss', (string)$second,
142
+				$cmd = [$this->binary, '-y', '-ss', (string) $second,
143 143
 					'-i', $absPath,
144 144
 					'-f', 'mjpeg', '-vframes', '1',
145 145
 					'-vf', 'zscale=min=2020_ncl:t=linear:npl=100,format=gbrpf32le,zscale=p=bt709,tonemap=tonemap=hable:desat=0,zscale=t=bt709:m=bt709:r=tv,format=yuv420p',
146 146
 					$tmpPath];
147 147
 			} else {
148 148
 				// always default to generating preview using non-HDR command
149
-				$cmd = [$this->binary, '-y', '-ss', (string)$second,
149
+				$cmd = [$this->binary, '-y', '-ss', (string) $second,
150 150
 					'-i', $absPath,
151 151
 					'-f', 'mjpeg', '-vframes', '1',
152 152
 					$tmpPath];
@@ -164,7 +164,7 @@  discard block
 block discarded – undo
164 164
 			$stderr = trim(stream_get_contents($pipes[2]));
165 165
 			$stdout = trim(stream_get_contents($pipes[1]));
166 166
 			$returnCode = proc_close($proc);
167
-			$output = $stdout . $stderr;
167
+			$output = $stdout.$stderr;
168 168
 		}
169 169
 
170 170
 		if ($returnCode === 0) {
Please login to merge, or discard this patch.