fix for upstream usenet
This commit is contained in:
@@ -39,7 +39,6 @@ async function WebTVListGroup(group) {
|
|||||||
wtvnews.selectGroup(group).then((response) => {
|
wtvnews.selectGroup(group).then((response) => {
|
||||||
let limit_per_page = (request_headers.query.limit) ? parseInt(request_headers.query.limit) : page_limit_default;
|
let limit_per_page = (request_headers.query.limit) ? parseInt(request_headers.query.limit) : page_limit_default;
|
||||||
const page = (request_headers.query.chunk) ? parseInt(request_headers.query.chunk) : 0;
|
const page = (request_headers.query.chunk) ? parseInt(request_headers.query.chunk) : 0;
|
||||||
console.log(response);
|
|
||||||
let page_start = (limit_per_page * page) + 1;
|
let page_start = (limit_per_page * page) + 1;
|
||||||
let page_end = (page + 1) * limit_per_page;
|
let page_end = (page + 1) * limit_per_page;
|
||||||
if (page_end > response.group.high) {
|
if (page_end > response.group.high) {
|
||||||
|
|||||||
@@ -111,7 +111,7 @@ class WTVNews {
|
|||||||
reject(e);
|
reject(e);
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
this.client.listNewsgroups((search === '*') ? '*' : '*' + search + '*').then((data) => {
|
this.client.listNewsgroups(search).then((data) => {
|
||||||
resolve(this.processGroupList(data));
|
resolve(this.processGroupList(data));
|
||||||
}).catch((e) => {
|
}).catch((e) => {
|
||||||
console.error(" * WTVNews Error:", "Command: listGroups (search)", search, e);
|
console.error(" * WTVNews Error:", "Command: listGroups (search)", search, e);
|
||||||
@@ -359,7 +359,6 @@ class WTVNews {
|
|||||||
if (article === "getCaseInsensitiveKey" || isNaN(article)) continue;
|
if (article === "getCaseInsensitiveKey" || isNaN(article)) continue;
|
||||||
promises.push(new Promise((resolve, reject) => {
|
promises.push(new Promise((resolve, reject) => {
|
||||||
this.getHeader(NGArticles[article]).then((data) => {
|
this.getHeader(NGArticles[article]).then((data) => {
|
||||||
console.log(data)
|
|
||||||
if (data.article) messages.push(data.article)
|
if (data.article) messages.push(data.article)
|
||||||
resolve();
|
resolve();
|
||||||
}).catch((e) => {
|
}).catch((e) => {
|
||||||
|
|||||||
Reference in New Issue
Block a user