Skip to content

Commit

Permalink
Fix the bug that the tags of downloaded galleries cannot be automatic…
Browse files Browse the repository at this point in the history
…ally updated

修复无法自动更新已下载画廊标签的bug
  • Loading branch information
jiangtian616 committed Nov 7, 2024
1 parent 7e451e9 commit 979395e
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 10 deletions.
5 changes: 4 additions & 1 deletion changelog/v8.0.6.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
- 修复移动端退出主路由的问题
- 修复阅读页重载图片后,本地缓存未更新的bug
- 修复阅读页切换为双列模式时页面渲染异常的bug
- 修复无法自动更新已下载画廊标签的bug

--------------------

Expand All @@ -20,4 +21,6 @@
- Remove the gesture of tag drag to scale in read page
- Remove the gesture of dragging and zooming after clicking on the reading page
- Fix the problem of exiting the main route on the mobile terminal
- Fix the bug that the local cache is not updated after reloading the image on the reading page
- Fix the bug that the local cache is not updated after reloading the image on the reading page
- Fix the bug that the page rendering is abnormal when switching to double-column mode on the reading page
- Fix the bug that the tags of downloaded galleries cannot be automatically updated
2 changes: 0 additions & 2 deletions lib/src/model/gallery_metadata.dart
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import 'package:jhentai/src/model/gallery_url.dart';

class GalleryMetadata {
GalleryUrl galleryUrl;
String archiveKey;
String title;
String japaneseTitle;
String category;
Expand All @@ -26,7 +25,6 @@ class GalleryMetadata {

GalleryMetadata({
required this.galleryUrl,
required this.archiveKey,
required this.title,
required this.japaneseTitle,
required this.category,
Expand Down
6 changes: 3 additions & 3 deletions lib/src/service/log.dart
Original file line number Diff line number Diff line change
Expand Up @@ -79,9 +79,9 @@ class LogService with JHLifeCircleBeanErrorCatch implements JHLifeCircleBean {

void warning(Object msg, [Object? error, bool withStack = false]) async {
await _initLogger();
_consoleLogger?.w(msg, stackTrace: withStack ? null : StackTrace.empty);
_verboseFileLogger?.w(msg, stackTrace: withStack ? null : StackTrace.empty);
_warningFileLogger?.w(msg, stackTrace: withStack ? null : StackTrace.empty);
_consoleLogger?.w(msg, error: error, stackTrace: withStack ? null : StackTrace.empty);
_verboseFileLogger?.w(msg, error: error, stackTrace: withStack ? null : StackTrace.empty);
_warningFileLogger?.w(msg, error: error, stackTrace: withStack ? null : StackTrace.empty);
}

void error(Object msg, [Object? error, StackTrace? stackTrace]) async {
Expand Down
4 changes: 2 additions & 2 deletions lib/src/service/schedule_service.dart
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ class ScheduleService with JHLifeCircleBeanErrorCatch implements JHLifeCircleBea
);
log.trace('refreshGalleryTags success, pageNo: $pageNo, archives: ${gallerys.map((a) => a.gid).toList()}');
} catch (e) {
log.warning('refreshGalleryTags error, gallerys: ${gallerys.map((a) => (gid: a.gid, token: a.token)).toList()}', e);
log.warning('refreshGalleryTags error, gallerys: ${gallerys.map((a) => (gid: a.gid, token: a.token)).toList()}', e, true);
}

pageNo++;
Expand Down Expand Up @@ -143,7 +143,7 @@ class ScheduleService with JHLifeCircleBeanErrorCatch implements JHLifeCircleBea
);
log.trace('refreshArchiveTags success, pageNo: $pageNo, archives: ${archives.map((a) => a.gid).toList()}');
} catch (e) {
log.warning('refreshArchiveTags error, archives: ${archives.map((a) => a.gid).toList()}', e);
log.warning('refreshArchiveTags error, archives: ${archives.map((a) => a.gid).toList()}', e, true);
}

pageNo++;
Expand Down
2 changes: 0 additions & 2 deletions lib/src/utils/eh_spider_parser.dart
Original file line number Diff line number Diff line change
Expand Up @@ -433,7 +433,6 @@ class EHSpiderParser {

return GalleryMetadata(
galleryUrl: GalleryUrl(isEH: true, gid: map['gid'], token: map['token']),
archiveKey: map['archiver_key'],
title: map['title'],
japaneseTitle: map['title_jpn'],
category: map['category'],
Expand Down Expand Up @@ -470,7 +469,6 @@ class EHSpiderParser {

return GalleryMetadata(
galleryUrl: GalleryUrl(isEH: true, gid: item['gid'], token: item['token']),
archiveKey: item['archiver_key'],
title: item['title'],
japaneseTitle: item['title_jpn'],
category: item['category'],
Expand Down

0 comments on commit 979395e

Please sign in to comment.