Browse Source

Fix lint error

Godzil 1 year ago
parent
commit
10d71944d9
5 changed files with 1662 additions and 7 deletions
  1. 1655 0
      package-lock.json
  2. 3 3
      src/episode.ts
  3. 1 1
      src/request.ts
  4. 2 2
      src/series.ts
  5. 1 1
      tsconfig.json

File diff suppressed because it is too large
+ 1655 - 0
package-lock.json


+ 3 - 3
src/episode.ts

@@ -2,7 +2,7 @@
 import cheerio = require('cheerio');
 import fs = require('fs');
 import mkdirp = require('mkdirp');
-import request = require('./request');
+import my_request = require('./my_request');
 import path = require('path');
 import subtitle from './subtitle/index';
 import video from './video/index';
@@ -245,7 +245,7 @@ function scrapePage(config: IConfig, address: string, done: (err: Error, page?:
     return done(new Error('Invalid address.'));
   }
 
-  request.get(config, address, (err, result) =>
+  my_request.get(config, address, (err, result) =>
   {
     if (err)
     {
@@ -301,7 +301,7 @@ function scrapePlayer(config: IConfig, address: string, id: number, done: (err:
     return done(new Error('Invalid address.'));
   }
 
-  request.post(config, {
+  my_request.post(config, {
     form: {current_page: address},
     url: url[1] + '/xml/?req=RpcApiVideoPlayer_GetStandardConfig&media_id=' + id,
   }, (err, result) =>

+ 1 - 1
src/request.ts

@@ -16,7 +16,7 @@ const defaultHeaders: request.Headers =
 /**
  * Performs a GET request for the resource.
  */
-export function get(config: IConfig, options: request.Options, done: (err: Error, result?: string) => void)
+export function get(config: IConfig, options: string|request.Options, done: (err: Error, result?: string) => void)
 {
   authenticate(config, err =>
   {

+ 2 - 2
src/series.ts

@@ -3,7 +3,7 @@ import cheerio = require('cheerio');
 import episode from './episode';
 import fs = require('fs');
 const fse = require('fs-extra');
-import request = require('./request');
+import my_request = require('./my_request');
 import path = require('path');
 import url = require('url');
 import log  = require('./log');
@@ -158,7 +158,7 @@ function page(config: IConfig, address: string, done: (err: Error, result?: ISer
   else
   {
     let episodeCount = 0;
-    request.get(config, address, (err, result) => {
+    my_request.get(config, address, (err, result) => {
       if (err) {
         return done(err);
       }

+ 1 - 1
tsconfig.json

@@ -31,7 +31,7 @@
         "src/interface/ISubtitle.d.ts",
         "src/interface/ISubtitleEvent.d.ts",
         "src/interface/ISubtitleStyle.d.ts",
-        "src/request.ts",
+        "src/my_request.ts",
         "src/series.ts",
         "src/subtitle/decode.ts",
         "src/subtitle/formats/ass.ts",