plugin fix (#1345)

* test

* float

* hotfix

* -float

* ****

* \

* misprint

* it's working lol
This commit is contained in:
Rider21
2024-11-30 05:10:57 +03:00
committed by GitHub
parent f352783ee1
commit aa8feeaac9
2 changed files with 11 additions and 7 deletions
+2 -2
View File
@@ -29,7 +29,7 @@ class MVLEMPYRPlugin implements Plugin.PluginBase {
name = 'MVLEMPYR';
icon = 'src/en/mvlempyr/icon.png';
site = 'https://www.mvlempyr.com/';
version = '1.0.2';
version = '1.0.3';
_chapSite = 'https://chp.mvlempyr.net/';
_allNovels: (Plugin.NovelItem & ExtraNovelData)[] | undefined;
@@ -348,7 +348,7 @@ class MVLEMPYRPlugin implements Plugin.PluginBase {
chapters: posts.map(chap => ({
name: chap.acf.ch_name,
path: 'chapter/' + chap.acf.novel_code + '-' + chap.acf.chapter_number,
date: chap.date,
releaseTime: chap.date,
chapterNumber: chap.acf.chapter_number,
})),
status: loadedCheerio('div.novelstatustextmedium').text(),
+9 -5
View File
@@ -18,7 +18,7 @@ class RLIB implements Plugin.PluginBase {
name = 'RanobeLib';
site = 'https://ranobelib.me';
apiSite = 'https://api.mangalib.me/api/manga/';
version = '2.1.1';
version = '2.1.2';
icon = 'src/ru/ranobelib/icon.png';
webStorageUtilized = true;
@@ -126,7 +126,7 @@ class RLIB implements Plugin.PluginBase {
novel.genres = genres.join(', ');
}
const branch_name: Record<number, string> = {};
const branch_name: Record<number, string> = { 0: 'главная страница' };
if (data.teams.length) {
data.teams.forEach(
({ name, details }) => (branch_name[details?.branch_id || '0'] = name),
@@ -162,7 +162,7 @@ class RLIB implements Plugin.PluginBase {
(branch_id || ''),
releaseTime: dayjs(created_at).format('LLL'),
chapterNumber: chapter.index,
page: branch_name[branch_id || '0'],
page: branch_name[branch_id || '0'] || 'Неизвестный',
}),
),
);
@@ -170,10 +170,14 @@ class RLIB implements Plugin.PluginBase {
if (chapters.length && data.teams.length > 1) {
//For whatever reason, the chapters overlap with another page.
chapters.sort((chapterA, chapterB) => {
if (chapterA.page !== chapterB.page) {
if (
chapterA.page &&
chapterB.page &&
chapterA.page !== chapterB.page
) {
return chapterA.page.localeCompare(chapterB.page);
}
return chapterA.chapterNumber - chapterB.chapterNumber;
return (chapterA.chapterNumber || 0) - (chapterB.chapterNumber || 0);
});
}