|
|
|
@ -139,7 +139,7 @@ module.exports.Search = class Search
|
|
|
|
|
if(!this.scanlator || this.scanlator == auxModule.scanlator )
|
|
|
|
|
try
|
|
|
|
|
{
|
|
|
|
|
var results = await auxModule.Search(this.ss);
|
|
|
|
|
var results = await auxModule.Search(this.ss);
|
|
|
|
|
//TODO: Defaults for missing info from the modules;
|
|
|
|
|
// console.log('Lib: Search: search method: result:', result);
|
|
|
|
|
results.sort((a, b) => {
|
|
|
|
@ -214,21 +214,25 @@ module.exports.SearchByTag = class SearchByTag
|
|
|
|
|
const auxModule = new module()
|
|
|
|
|
try
|
|
|
|
|
{
|
|
|
|
|
var results = await auxModule.SearchByTag(this.ss, ammount);
|
|
|
|
|
let results = await auxModule.SearchByTag(this.ss, ammount);
|
|
|
|
|
//TODO: Defaults for missing info from the modules;
|
|
|
|
|
// console.log('Lib: Search: search method: result:', results);
|
|
|
|
|
results.sort((a, b) => {
|
|
|
|
|
if (a.title.toUpperCase() < b.title.toUpperCase()) return -1;
|
|
|
|
|
else return 1;
|
|
|
|
|
});
|
|
|
|
|
for(var i = 0; i< results.length; i++)
|
|
|
|
|
if(results)
|
|
|
|
|
{
|
|
|
|
|
results[i]['Status'] = results[i].status;
|
|
|
|
|
results.sort((a, b) =>
|
|
|
|
|
{
|
|
|
|
|
if (a.title.toUpperCase() < b.title.toUpperCase()) return -1;
|
|
|
|
|
else return 1;
|
|
|
|
|
});
|
|
|
|
|
for(let i = 0; i< results.length; i++)
|
|
|
|
|
{
|
|
|
|
|
let manga = await auxModule.GetManga(results[i].link, results[i].title);
|
|
|
|
|
results[i] = {...manga};
|
|
|
|
|
}
|
|
|
|
|
this.results.push({
|
|
|
|
|
Results:results,
|
|
|
|
|
scanlator:auxModule.scanlator
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
this.results.push({
|
|
|
|
|
Results:results,
|
|
|
|
|
scanlator:auxModule.scanlator
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
catch (error)
|
|
|
|
|
{
|
|
|
|
|