diff --git a/crunchyroll.js.njsproj b/crunchyroll.js.njsproj
index c172f40..1b4e9a5 100644
--- a/crunchyroll.js.njsproj
+++ b/crunchyroll.js.njsproj
@@ -63,9 +63,6 @@
-
-
-
diff --git a/crunchyroll.js.sln.DotSettings b/crunchyroll.js.sln.DotSettings
index dd8e72f..382ff54 100644
--- a/crunchyroll.js.sln.DotSettings
+++ b/crunchyroll.js.sln.DotSettings
@@ -1,4 +1,5 @@
+ Disabled
DO_NOT_SHOW
DO_NOT_SHOW
DO_NOT_SHOW
@@ -46,6 +47,13 @@
<Policy Inspect="True" Prefix="" Suffix="" Style="aaBb" />
<Policy Inspect="True" Prefix="" Suffix="" Style="aaBb" />
<Policy Inspect="True" Prefix="T" Suffix="" Style="AaBb" />
+ <Policy Inspect="True" Prefix="" Suffix="" Style="AaBb" />
+ <Policy Inspect="True" Prefix="" Suffix="" Style="AaBb" />
+ <Policy Inspect="True" Prefix="" Suffix="" Style="AaBb" />
+ <Policy Inspect="True" Prefix="" Suffix="" Style="AaBb" />
+ <Policy Inspect="True" Prefix="" Suffix="" Style="aaBb" />
+ <Policy Inspect="True" Prefix="" Suffix="" Style="AaBb" />
+ <Policy Inspect="True" Prefix="" Suffix="" Style="AaBb" />
True
RelativeDotSlash
True
diff --git a/package.json b/package.json
index d269631..0553490 100644
--- a/package.json
+++ b/package.json
@@ -7,7 +7,10 @@
"crunchyroll"
],
"name": "crunchyroll",
- "repository": "git://github.com/Deathspike/crunchyroll.js.git",
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/Deathspike/crunchyroll.js.git"
+ },
"version": "1.1.0",
"bin": {
"crunchyroll": "./bin/crunchyroll"
@@ -29,4 +32,4 @@
"prepublish": "npm run tsd && node ts",
"tsd": "./node_modules/.bin/tsd reinstall --overwrite"
}
-}
+}
\ No newline at end of file
diff --git a/src/episode.ts b/src/episode.ts
index d4d8a30..0a0d56a 100644
--- a/src/episode.ts
+++ b/src/episode.ts
@@ -79,7 +79,11 @@ function downloadSubtitle(config: typings.IConfig, player: typings.IEpisodePlaye
/**
* Streams the video to disk.
*/
-function downloadVideo(config: typings.IConfig, page: typings.IEpisodePage, player: typings.IEpisodePlayer, filePath: string, done: (err: Error) => void) {
+function downloadVideo(config: typings.IConfig,
+ page: typings.IEpisodePage,
+ player: typings.IEpisodePlayer,
+ filePath: string,
+ done: (err: Error) => void) {
video.stream(
player.video.host,
player.video.file,
diff --git a/src/request.ts b/src/request.ts
index 2e15185..947dd04 100644
--- a/src/request.ts
+++ b/src/request.ts
@@ -17,8 +17,8 @@ export function get(config: typings.IConfig, options: request.Options, done: (er
}
/**
-* Performs a POST request for the resource.
-*/
+ * Performs a POST request for the resource.
+ */
export function post(config: typings.IConfig, options: request.Options, done: (err: Error, result?: string) => void) {
authenticate(config, err => {
if (err) return done(err);
diff --git a/src/series.ts b/src/series.ts
index 0946763..a8d6ec4 100644
--- a/src/series.ts
+++ b/src/series.ts
@@ -38,7 +38,11 @@ function main(config: typings.IConfig, address: string, done: (err: Error) => vo
/**
* Downloads the episode.
*/
-function download(cache: {[address: string]: number}, config: typings.IConfig, baseAddress: string, item: typings.ISeriesEpisode, done: (err: Error) => void) {
+function download(cache: {[address: string]: number},
+ config: typings.IConfig,
+ baseAddress: string,
+ item: typings.ISeriesEpisode,
+ done: (err: Error) => void) {
if (!filter(config, item)) return done(null);
var address = url.resolve(baseAddress, item.address);
if (cache[address]) return done(null);
diff --git a/src/subtitle/decode.ts b/src/subtitle/decode.ts
index ec90651..1773bb1 100644
--- a/src/subtitle/decode.ts
+++ b/src/subtitle/decode.ts
@@ -1,7 +1,7 @@
+/* tslint:disable:no-bitwise false */
'use strict';
export = main;
import crypto = require('crypto');
-import bigInt = require('big-integer');
import zlib = require('zlib');
/**
diff --git a/src/video/merge.ts b/src/video/merge.ts
index 2e68fbf..ec13fce 100644
--- a/src/video/merge.ts
+++ b/src/video/merge.ts
@@ -17,14 +17,14 @@ function main(config: typings.IConfig, rtmpInputPath: string, filePath: string,
'-o "' + filePath + '.mkv" ' +
'"' + videoPath + '" ' +
'"' + subtitlePath + '"', {
- maxBuffer: Infinity
- }, err => {
- if (err) return done(err);
- unlink(videoPath, subtitlePath, err => {
- if (err) unlinkTimeout(videoPath, subtitlePath, 5000);
- done(null);
+ maxBuffer: Infinity
+ }, err => {
+ if (err) return done(err);
+ unlink(videoPath, subtitlePath, err => {
+ if (err) unlinkTimeout(videoPath, subtitlePath, 5000);
+ done(null);
+ });
});
- });
}
/**
diff --git a/ts.js b/ts.js
index bf834a5..b1af1cf 100644
--- a/ts.js
+++ b/ts.js
@@ -48,7 +48,10 @@ function clean(filePaths, done) {
function compile(filePaths, done) {
var execPath = path.join(__dirname, 'node_modules/.bin/tsc');
var options = '--declaration --module CommonJS --noImplicitAny --outDir dist';
- childProcess.exec([execPath, options].concat(filePaths).join(' '), done);
+ childProcess.exec([execPath, options].concat(filePaths).join(' '), function(err, stdout) {
+ if (stdout) return done(new Error(stdout));
+ done(null);
+ });
}
/**
diff --git a/tslint.json b/tslint.json
index bee1b16..cde33f5 100644
--- a/tslint.json
+++ b/tslint.json
@@ -3,11 +3,10 @@
"ban": false,
"class-name": true,
"comment-format": [true,
- "check-space",
- "check-lowercase"
+ "check-space"
],
"curly": false,
- "eofline": true,
+ "eofline": false,
"forin": true,
"indent": [true, 2],
"interface-name": true,
@@ -44,7 +43,7 @@
"no-unused-expression": true,
"no-unused-variable": true,
"no-unreachable": true,
- "no-use-before-declare": true,
+ "no-use-before-declare": false,
"no-var-requires": true,
"one-line": [true,
"check-catch",
@@ -57,11 +56,8 @@
"semicolon": true,
"triple-equals": [true, "allow-null-check"],
"typedef": [true,
- "call-signature",
"member-variable-declaration",
- "parameter",
- "property-declaration",
- "variable-declaration"
+ "property-declaration"
],
"typedef-whitespace": [true, {
"call-signature": "nospace",
@@ -70,10 +66,7 @@
"property-declaration": "nospace",
"variable-declaration": "nospace"
}],
- "use-strict": [true,
- "check-module",
- "check-function"
- ],
+ "use-strict": false,
"variable-name": false,
"whitespace": [true,
"check-branch",