From a93b32879c6b9c593663d8f1f788e947b75cf2d6 Mon Sep 17 00:00:00 2001 From: Luca Armaroli Date: Wed, 9 Sep 2020 05:00:28 +0200 Subject: [PATCH] updating comments --- src/DownloadManager.ts | 8 +++----- src/Events.ts | 2 -- src/Types.ts | 2 +- 3 files changed, 4 insertions(+), 8 deletions(-) diff --git a/src/DownloadManager.ts b/src/DownloadManager.ts index 43ee944..afadb56 100644 --- a/src/DownloadManager.ts +++ b/src/DownloadManager.ts @@ -3,13 +3,11 @@ import { logger } from './Logger'; import cliProgress from 'cli-progress'; import WebSocket from 'ws'; -// TODO: ADD ERROR HANDLING!!! -// FIXME: progress bar does not update after the first time, it just fills up immediatly export class DownloadManager { private webSocket: WebSocket; // TODO: there's a "not a tty" mode for progresBar - // FIXME: is there a way to fix the ETA? Can't get size nor ETA from aria that I can see + // NOTE: is there a way to fix the ETA? Can't get size nor ETA from aria that I can see // we initialize this for each download private progresBar!: cliProgress.Bar; private completed: number; @@ -37,7 +35,7 @@ export class DownloadManager { const parsed = JSON.parse(data.toString()); // print only messaged not handled during download - // TODO: maybe we could remove this and re-add when the downloads are done + // NOTE: maybe we could remove this and re-add when the downloads are done if (parsed.method !== 'aria2.onDownloadComplete' && parsed.method !== 'aria2.onDownloadStart' && parsed.id !== 'getSpeed' && @@ -166,7 +164,7 @@ export class DownloadManager { this.queue.delete(parsed.params.pop().gid.toString()); this.progresBar.update(++this.completed); - /* TODO: probably we could use setIntervall because reling on + /* NOTE: probably we could use setIntervall because reling on a completed download is good in most cases (since the segments are small and a lot, somany and frequent updates) BUT if the user internet speed is really low the completed downalods come in diff --git a/src/Events.ts b/src/Events.ts index b54469d..6585cd7 100644 --- a/src/Events.ts +++ b/src/Events.ts @@ -5,8 +5,6 @@ import { logger } from './Logger'; /** * This file contains global destreamer process events * - * @note SIGINT event is overridden in downloadVideo function - * * @note function is required for non-packaged destreamer, so we can't do better */ export function setProcessEvents(): void { diff --git a/src/Types.ts b/src/Types.ts index ebcc40e..d074bc3 100644 --- a/src/Types.ts +++ b/src/Types.ts @@ -27,7 +27,7 @@ export type Video = { } -/* TODO: expand this template once we are all on board with a list +/* NOTE: expand this template once we are all on board with a list see https://github.com/snobu/destreamer/issues/190#issuecomment-663718010 for list*/ export const templateElements: Array = [ 'title',