Make tslint happy!
This commit is contained in:
parent
849c7612aa
commit
7c04fb7282
@ -32,7 +32,7 @@ export default function(args: string[], done: (err?: Error) => void)
|
|||||||
}
|
}
|
||||||
catch (e)
|
catch (e)
|
||||||
{
|
{
|
||||||
log.warn(`Invalid resolution ${config.resolution}p. Setting to 1080p`);
|
log.warn('Invalid resolution ' + config.resolution + 'p. Setting to 1080p');
|
||||||
config.video_format = resol_table['1080'].format;
|
config.video_format = resol_table['1080'].format;
|
||||||
config.video_quality = resol_table['1080'].quality;
|
config.video_quality = resol_table['1080'].quality;
|
||||||
}
|
}
|
||||||
@ -46,7 +46,10 @@ export default function(args: string[], done: (err?: Error) => void)
|
|||||||
|
|
||||||
tasks(config, batchPath, (err, tasksArr) =>
|
tasks(config, batchPath, (err, tasksArr) =>
|
||||||
{
|
{
|
||||||
if (err) return done(err);
|
if (err)
|
||||||
|
{
|
||||||
|
return done(err);
|
||||||
|
}
|
||||||
|
|
||||||
let i = 0;
|
let i = 0;
|
||||||
|
|
||||||
|
|||||||
@ -8,6 +8,6 @@ batch(process.argv, (err: any) =>
|
|||||||
console.error(err.stack || err);
|
console.error(err.stack || err);
|
||||||
process.exit(-1);
|
process.exit(-1);
|
||||||
}
|
}
|
||||||
console.log('Done!');
|
console.info('Done!');
|
||||||
process.exit(0);
|
process.exit(0);
|
||||||
});
|
});
|
||||||
|
|||||||
@ -271,7 +271,7 @@ function scrapePage(config: IConfig, address: string, done: (err: Error, page?:
|
|||||||
const regexp = /\s*([^\n\r\t\f]+)\n?\s*[^0-9]*([0-9][\-0-9.]*)?,?\n?\s\s*[^0-9]*((PV )?[S0-9][P0-9.]*[a-fA-F]?)/;
|
const regexp = /\s*([^\n\r\t\f]+)\n?\s*[^0-9]*([0-9][\-0-9.]*)?,?\n?\s\s*[^0-9]*((PV )?[S0-9][P0-9.]*[a-fA-F]?)/;
|
||||||
const look = $('#showmedia_about_media').text();
|
const look = $('#showmedia_about_media').text();
|
||||||
const seasonTitle = $('span[itemprop="title"]').text();
|
const seasonTitle = $('span[itemprop="title"]').text();
|
||||||
let episodeTitle = $('#showmedia_about_name').text().replace(/[“”]/g, '');
|
const episodeTitle = $('#showmedia_about_name').text().replace(/[“”]/g, '');
|
||||||
const data = regexp.exec(look);
|
const data = regexp.exec(look);
|
||||||
|
|
||||||
if (!swf || !data)
|
if (!swf || !data)
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
import cheerio = require('cheerio');
|
import cheerio = require('cheerio');
|
||||||
import episode from './episode';
|
import episode from './episode';
|
||||||
import fs = require('fs');
|
import fs = require('fs');
|
||||||
const fse = require('fs-extra');
|
import fse = require('fs-extra');
|
||||||
import my_request = require('./my_request');
|
import my_request = require('./my_request');
|
||||||
import path = require('path');
|
import path = require('path');
|
||||||
import url = require('url');
|
import url = require('url');
|
||||||
@ -153,7 +153,7 @@ function page(config: IConfig, address: string, done: (err: Error, result?: ISer
|
|||||||
episode: '',
|
episode: '',
|
||||||
volume: 0,
|
volume: 0,
|
||||||
});
|
});
|
||||||
done(null, {episodes: episodes.reverse(), series: ""});
|
done(null, {episodes: episodes.reverse(), series: ''});
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -195,7 +195,7 @@ function page(config: IConfig, address: string, done: (err: Error, result?: ISer
|
|||||||
});
|
});
|
||||||
if (episodeCount === 0)
|
if (episodeCount === 0)
|
||||||
{
|
{
|
||||||
log.warn("No episodes found for " + title + ". Could it be a movie?");
|
log.warn('No episodes found for ' + title + '. Could it be a movie?');
|
||||||
}
|
}
|
||||||
done(null, {episodes: episodes.reverse(), series: title});
|
done(null, {episodes: episodes.reverse(), series: title});
|
||||||
});
|
});
|
||||||
|
|||||||
@ -33,10 +33,10 @@ export default function(input: string|Buffer, done: (err: Error, subtitle?: stri
|
|||||||
*/
|
*/
|
||||||
function event(block: ISubtitleEvent): string
|
function event(block: ISubtitleEvent): string
|
||||||
{
|
{
|
||||||
var format = 'Layer,Start,End,Style,Name,MarginL,MarginR,MarginV,Effect,Text';
|
const format = 'Layer,Start,End,Style,Name,MarginL,MarginR,MarginV,Effect,Text';
|
||||||
|
|
||||||
return '[Events]\n' +
|
return '[Events]\n' +
|
||||||
'Format: ' + format + '\n' + [].concat(block.event).map(style => ('Dialogue: 0,' +
|
'Format: ' + format + '\n' + [].concat(block.event).map((style) => ('Dialogue: 0,' +
|
||||||
style.$.start + ',' +
|
style.$.start + ',' +
|
||||||
style.$.end + ',' +
|
style.$.end + ',' +
|
||||||
style.$.style + ',' +
|
style.$.style + ',' +
|
||||||
@ -70,13 +70,13 @@ function script(block: ISubtitle): string
|
|||||||
*/
|
*/
|
||||||
function style(block: ISubtitleStyle): string
|
function style(block: ISubtitleStyle): string
|
||||||
{
|
{
|
||||||
var format = 'Name,Fontname,Fontsize,PrimaryColour,SecondaryColour,' +
|
const format = 'Name,Fontname,Fontsize,PrimaryColour,SecondaryColour,' +
|
||||||
'OutlineColour,BackColour,Bold,Italic,Underline,StrikeOut,ScaleX,' +
|
'OutlineColour,BackColour,Bold,Italic,Underline,StrikeOut,ScaleX,' +
|
||||||
'ScaleY,Spacing,Angle,BorderStyle,Outline,Shadow,Alignment,' +
|
'ScaleY,Spacing,Angle,BorderStyle,Outline,Shadow,Alignment,' +
|
||||||
'MarginL,MarginR,MarginV,Encoding';
|
'MarginL,MarginR,MarginV,Encoding';
|
||||||
|
|
||||||
return '[V4+ Styles]\n' +
|
return '[V4+ Styles]\n' +
|
||||||
'Format: ' + format + '\n' + [].concat(block.style).map(style => 'Style: ' +
|
'Format: ' + format + '\n' + [].concat(block.style).map((style) => 'Style: ' +
|
||||||
style.$.name + ',' +
|
style.$.name + ',' +
|
||||||
style.$.font_name + ',' +
|
style.$.font_name + ',' +
|
||||||
style.$.font_size + ',' +
|
style.$.font_size + ',' +
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
import ass from './ass';
|
import ass from './ass';
|
||||||
import srt from './srt';
|
import srt from './srt';
|
||||||
|
|
||||||
export default <IFormatterTable> {
|
export default {
|
||||||
ass: ass,
|
ass,
|
||||||
srt: srt
|
srt
|
||||||
};
|
} as IFormatterTable;
|
||||||
|
|||||||
@ -27,7 +27,8 @@ export default function(rtmpUrl: string, rtmpInputPath: string, swfUrl: string,
|
|||||||
'-i "' + rtmpInputPath + '" ' +
|
'-i "' + rtmpInputPath + '" ' +
|
||||||
'-c copy -bsf:a aac_adtstoasc ' +
|
'-c copy -bsf:a aac_adtstoasc ' +
|
||||||
'"' + filePath + '.mp4"';
|
'"' + filePath + '.mp4"';
|
||||||
childProcess.exec(cmd, {
|
childProcess.exec(cmd,
|
||||||
|
{
|
||||||
maxBuffer: Infinity,
|
maxBuffer: Infinity,
|
||||||
}, done);
|
}, done);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -17,11 +17,12 @@
|
|||||||
"member-ordering": false,
|
"member-ordering": false,
|
||||||
"no-shadowed-variable": false,
|
"no-shadowed-variable": false,
|
||||||
"array-type": [true, "array"],
|
"array-type": [true, "array"],
|
||||||
"object-literal-sort-keys": false,
|
|
||||||
"trailing-comma": false,
|
"trailing-comma": false,
|
||||||
"no-any": false,
|
"no-any": false,
|
||||||
"no-arg": true,
|
"no-arg": true,
|
||||||
"no-bitwise": true,
|
"no-bitwise": true,
|
||||||
|
"space-within-parens": false,
|
||||||
|
"no-object-literal-type-assertion": false,
|
||||||
"no-console": [true,
|
"no-console": [true,
|
||||||
"debug",
|
"debug",
|
||||||
"time",
|
"time",
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user