Skip to content

Commit

Permalink
fix #500: start_chapter_NO_next_time
Browse files Browse the repository at this point in the history
  • Loading branch information
kanasimi committed Apr 10, 2021
1 parent dc89990 commit 1e2d6b5
Show file tree
Hide file tree
Showing 6 changed files with 27 additions and 13 deletions.
24 changes: 17 additions & 7 deletions comic.cmn-Hans-CN/kuaikan.js
Original file line number Diff line number Diff line change
Expand Up @@ -84,14 +84,17 @@ var crawler = new CeL.work_crawler({
html = eval(html
//
.between('<script>window.__NUXT__=', ';</script>')).data[0];
// console.trace(html);
Object.assign(work_data, html.topicInfo);
work_data.chapter_list = html.comics.reverse().map(
function(chapter_data) {
chapter_data.url = 'web/comic/' + chapter_data.id;
if (chapter_data.locked)
chapter_data.limited = true;
return chapter_data;
});
work_data.chapter_list = html.comics.reverse()
//
.map(function(chapter_data, index) {
chapter_data.url = 'web/comic/' + chapter_data.id;
if (chapter_data.locked) {
chapter_data.limited = true;
}
return chapter_data;
});
// console.log(work_data);
return work_data;
},
Expand All @@ -101,15 +104,22 @@ var crawler = new CeL.work_crawler({
html = eval(html
//
.between('<script>window.__NUXT__=', ';</script>')).data[0];
// console.trace(html);

var chapter_data = work_data.chapter_list[chapter_NO - 1];

chapter_data.image_list = html.comicInfo.comicImages;
// delete html.comicInfo.comicImages;

if (chapter_data.limited && !work_data.start_chapter_NO_next_time) {
CeL.info(CeL.gettext('下次從《%1》起下載。', chapter_data.title));
work_data.start_chapter_NO_next_time = chapter_NO;
}

// `comicInfo` 的資訊較不精確!
// Object.assign(chapter_data, html.comicInfo);
// console.log(chapter_data);
// console.log(work_data);

return chapter_data;
}
Expand Down
4 changes: 2 additions & 2 deletions comic.cmn-Hans-CN/qq.js
Original file line number Diff line number Diff line change
Expand Up @@ -312,9 +312,9 @@ crawler = new CeL.work_crawler({
// https://manhua.qpic.cn/manhua_detail/0/14_11_10_a1827afc3b8d37cfd3f7242cc713f5751_109708576.png/0
'/14_11_10_a1827afc3b8d37cfd3f7242cc713f5751_109708576.png')) {
// assert: chapter_data.picture[0].pid === 16111
if (!work_data.last_download.start_chapter_next_time) {
if (!work_data.start_chapter_NO_next_time) {
CeL.info(CeL.gettext('下次從《%1》起下載。', chapter_data.title));
work_data.last_download.start_chapter_next_time = chapter_NO;
work_data.start_chapter_NO_next_time = chapter_NO;
}
// work_data.chapter_list.truncate(chapter_NO);
chapter_data.limited = true;
Expand Down
6 changes: 5 additions & 1 deletion comic.cmn-Hant-TW/18comic.work.html
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,11 @@
<h2 id="title_panel"></h2>
<div id="image_panel"></div>

本頁面僅能用於新版瀏覽器。且您必須先解開所有壓縮檔才能以本頁面瀏覽圖片!
<div id="usage_panel">
本頁面僅能用於新版瀏覽器。且您必須先解開所有壓縮檔才能以本頁面瀏覽圖片!<br />
可使用左右方向鍵以控制前後章節。<br />
下載時採用 <code>archive_images=false</code> 將不會壓縮檔案。
</div>

<script type="text/javascript">

Expand Down
2 changes: 1 addition & 1 deletion resources/cmn-Hans-CN.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion resources/en-US.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion resources/pt-BR.js

Large diffs are not rendered by default.

0 comments on commit 1e2d6b5

Please sign in to comment.