Add missing mode parameter to the stream object. (and correct call to it)

This commit is contained in:
Godzil 2016-08-13 21:24:57 +01:00
parent 422d0827f9
commit 62a08e14bb
2 changed files with 3 additions and 2 deletions

View File

@ -89,6 +89,7 @@ function downloadVideo(config: IConfig,
player.video.file, player.video.file,
page.swf, page.swf,
filePath, path.extname(player.video.file), filePath, path.extname(player.video.file),
player.video.mode,
done); done);
} }
@ -164,7 +165,7 @@ function scrapePlayer(config: IConfig, address: string, id: number, done: (err:
data: player['default:preload'].subtitle.data data: player['default:preload'].subtitle.data
} : null, } : null,
video: { video: {
mode: streamMode; mode: streamMode;
file: player['default:preload'].stream_info.file, file: player['default:preload'].stream_info.file,
host: player['default:preload'].stream_info.host host: player['default:preload'].stream_info.host
} }

View File

@ -6,7 +6,7 @@ import os = require('os');
/** /**
* Streams the video to disk. * Streams the video to disk.
*/ */
export default function(rtmpUrl: string, rtmpInputPath: string, swfUrl: string, filePath: string, fileExt: string, done: (err: Error) => void) { export default function(rtmpUrl: string, rtmpInputPath: string, swfUrl: string, filePath: string, fileExt: string, mode: string, done: (err: Error) => void) {
if (mode == "RTMP") if (mode == "RTMP")
{ {
childProcess.exec(command("rtmpdump") + ' ' + childProcess.exec(command("rtmpdump") + ' ' +