Fix(Madara & lighnovelwp): remove site url regardless of this.site (#965)
* remove site url regardless of this.site & riwyat new url * MTL-Novel fix empty novels
This commit is contained in:
@@ -81,7 +81,7 @@ class LightNovelWPPlugin implements Plugin.PluginBase {
|
|||||||
novels.push({
|
novels.push({
|
||||||
name: novelName,
|
name: novelName,
|
||||||
cover: image.attr('data-src') || image.attr('src') || defaultCover,
|
cover: image.attr('data-src') || image.attr('src') || defaultCover,
|
||||||
path: novelUrl.replace(this.site, ''),
|
path: novelUrl.replace(/https?:\/\/.*?\//, '/'),
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@@ -113,7 +113,7 @@ class LightNovelWPPlugin implements Plugin.PluginBase {
|
|||||||
const $ = await this.getCheerio(this.site + novelPath, false);
|
const $ = await this.getCheerio(this.site + novelPath, false);
|
||||||
|
|
||||||
const novel: Plugin.SourceNovel = {
|
const novel: Plugin.SourceNovel = {
|
||||||
path: novelPath.replace(this.site, ''),
|
path: novelPath.replace(/https?:\/\/.*?\//, '/'),
|
||||||
name: 'Untitled',
|
name: 'Untitled',
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -242,7 +242,7 @@ class LightNovelWPPlugin implements Plugin.PluginBase {
|
|||||||
if (isFreeChapter)
|
if (isFreeChapter)
|
||||||
chapters.push({
|
chapters.push({
|
||||||
name: chapterName,
|
name: chapterName,
|
||||||
path: chapterUrl.replace(this.site, ''),
|
path: chapterUrl.replace(/https?:\/\/.*?\//, '/'),
|
||||||
releaseTime: releaseTime,
|
releaseTime: releaseTime,
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -134,12 +134,12 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"id": "riwyat",
|
"id": "riwyat",
|
||||||
"sourceSite": "https://riwyat.com/",
|
"sourceSite": "https://riwyat.org/",
|
||||||
"sourceName": "Riwyat",
|
"sourceName": "Riwyat",
|
||||||
"options": {
|
"options": {
|
||||||
"useNewChapterEndpoint": true,
|
"useNewChapterEndpoint": true,
|
||||||
"lang": "Arabic",
|
"lang": "Arabic",
|
||||||
"versionIncrements": 1
|
"versionIncrements": 2
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -184,7 +184,8 @@
|
|||||||
"sourceSite": "https://mtl-novel.com/",
|
"sourceSite": "https://mtl-novel.com/",
|
||||||
"sourceName": "MTL-Novel",
|
"sourceName": "MTL-Novel",
|
||||||
"options": {
|
"options": {
|
||||||
"useNewChapterEndpoint": true
|
"useNewChapterEndpoint": false,
|
||||||
|
"versionIncrements": 1
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -69,7 +69,12 @@ class MadaraPlugin implements Plugin.PluginBase {
|
|||||||
: letter;
|
: letter;
|
||||||
})
|
})
|
||||||
.join('');
|
.join('');
|
||||||
$el.html($el.html()?.replace($el.text(), reversedLetters).replace('\n', '<br>') || '');
|
$el.html(
|
||||||
|
$el
|
||||||
|
.html()
|
||||||
|
?.replace($el.text(), reversedLetters)
|
||||||
|
.replace('\n', '<br>') || '',
|
||||||
|
);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
return text;
|
return text;
|
||||||
@@ -125,7 +130,7 @@ class MadaraPlugin implements Plugin.PluginBase {
|
|||||||
const novel: Plugin.NovelItem = {
|
const novel: Plugin.NovelItem = {
|
||||||
name: novelName,
|
name: novelName,
|
||||||
cover: novelCover,
|
cover: novelCover,
|
||||||
path: novelUrl.replace(this.site, ''),
|
path: novelUrl.replace(/https?:\/\/.*?\//, '/'),
|
||||||
};
|
};
|
||||||
novels.push(novel);
|
novels.push(novel);
|
||||||
},
|
},
|
||||||
@@ -249,7 +254,7 @@ class MadaraPlugin implements Plugin.PluginBase {
|
|||||||
|
|
||||||
chapters.push({
|
chapters.push({
|
||||||
name: chapterName,
|
name: chapterName,
|
||||||
path: chapterUrl.replace(this.site, ''),
|
path: chapterUrl.replace(/https?:\/\/.*?\//, '/'),
|
||||||
releaseTime: releaseDate || null,
|
releaseTime: releaseDate || null,
|
||||||
chapterNumber: totalChapters - chapterIndex,
|
chapterNumber: totalChapters - chapterIndex,
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user