Skip to content

Commit

Permalink
max download task running count
Browse files Browse the repository at this point in the history
  • Loading branch information
Notsfsssf committed Aug 15, 2021
1 parent 1613999 commit 298e88a
Show file tree
Hide file tree
Showing 27 changed files with 144 additions and 75 deletions.
Binary file not shown.
Binary file added .gradle/6.1.1/fileChanges/last-build.bin
Binary file not shown.
Binary file added .gradle/6.1.1/fileHashes/fileHashes.lock
Binary file not shown.
Empty file added .gradle/6.1.1/gc.properties
Empty file.
Binary file added .gradle/buildOutputCleanup/buildOutputCleanup.lock
Binary file not shown.
2 changes: 2 additions & 0 deletions .gradle/buildOutputCleanup/cache.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#Sun Aug 01 19:43:54 CST 2021
gradle.version=6.1.1
Binary file added .gradle/checksums/checksums.lock
Binary file not shown.
Empty file added .gradle/vcs-1/gc.properties
Empty file.
4 changes: 2 additions & 2 deletions android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -84,8 +84,8 @@ android {
applicationId packageName
minSdkVersion 21
targetSdkVersion 30
versionCode 10005080
versionName "0.5.8 sleeping"
versionCode 10005086
versionName "0.5.9 X"
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
Expand Down
2 changes: 1 addition & 1 deletion lib/er/fetcher.dart
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ class Fetcher {
List<String> urlPool = [];

nextJob() {
if (queue.isNotEmpty && urlPool.length < 2) {
if (queue.isNotEmpty && urlPool.length < userSetting.maxRunningTask) {
var first = queue.first;
if (urlPool.contains(first)) return;
IsoContactBean isoContactBean =
Expand Down
3 changes: 2 additions & 1 deletion lib/l10n/intl_en.arb
Original file line number Diff line number Diff line change
Expand Up @@ -236,5 +236,6 @@
"copy": "copy",
"view_replies": "View reply",
"temporarily_visible": "temporarily visible",
"unclassified":"Unclassified"
"unclassified":"Unclassified",
"max_download_task_running_count": "Max download task running count"
}
19 changes: 10 additions & 9 deletions lib/l10n/intl_en_US.arb
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@
"manga": "Manga",
"medium": "Medium",
"mode_list": "Daily For_male For_female Original Rookie Weekly Monthly XVIII XVIII_WEEKLY XVIII_G",
"novel_mode_list":"Daily For_male For_female Weekly XVIII XVIII_WEEKLY XVIII_G",
"novel_mode_list": "Daily For_male For_female Weekly XVIII XVIII_WEEKLY XVIII_G",
"more": "More",
"more_then_starnum_bookmark": "More than {starNum} like(s)",
"@more_then_starnum_bookmark": {
Expand Down Expand Up @@ -153,8 +153,8 @@
"description": "A message with a parameter",
"placeholders": {
"name": {
"type": "String",
"example": "Bob"
"type": "String",
"example": "Bob"
}
}
},
Expand Down Expand Up @@ -221,8 +221,8 @@
"description": "A message with a parameter",
"placeholders": {
"part": {
"type": "String",
"example": "Bob"
"type": "String",
"example": "Bob"
}
}
},
Expand All @@ -234,8 +234,8 @@
"login_error_message": "Incorrect account or password, or using a weak password, may cause login failure",
"translate": "translate",
"retry_seed_task": "retry seed task",
"manga_detail_page_quality":"Manga quality (Details page)",
"follow_after_star":"Follow after star",
"manga_detail_page_quality": "Manga quality (Details page)",
"follow_after_star": "Follow after star",
"default_title": "Default",
"image_site": "Image Site",
"network": "Network",
Expand All @@ -245,5 +245,6 @@
"copy": "copy",
"view_replies": "View reply",
"temporarily_visible": "temporarily visible",
"unclassified":"Unclassified"
}
"unclassified": "Unclassified",
"max_download_task_running_count": "Max download task running count"
}
3 changes: 2 additions & 1 deletion lib/l10n/intl_es.arb
Original file line number Diff line number Diff line change
Expand Up @@ -236,5 +236,6 @@
"copy": "copiar",
"view_replies": "View reply",
"temporarily_visible": "temporarily visible",
"unclassified":"Unclassified"
"unclassified":"Unclassified",
"max_download_task_running_count": "Max download task running count"
}
3 changes: 2 additions & 1 deletion lib/l10n/intl_ja.arb
Original file line number Diff line number Diff line change
Expand Up @@ -245,5 +245,6 @@
"copy": "コピー",
"view_replies": "コメントを見る",
"temporarily_visible": "temporarily visible",
"unclassified":"Unclassified"
"unclassified":"Unclassified",
"max_download_task_running_count": "Max download task running count"
}
3 changes: 2 additions & 1 deletion lib/l10n/intl_ko.arb
Original file line number Diff line number Diff line change
Expand Up @@ -245,5 +245,6 @@
"copy": "copy",
"view_replies": "View reply",
"temporarily_visible": "temporarily visible",
"unclassified":"Unclassified"
"unclassified":"Unclassified",
"max_download_task_running_count": "Max download task running count"
}
3 changes: 2 additions & 1 deletion lib/l10n/intl_ru.arb
Original file line number Diff line number Diff line change
Expand Up @@ -245,5 +245,6 @@
"copy": "Копировать",
"view_replies": "Показать ответы",
"temporarily_visible": "temporarily visible",
"unclassified":"Unclassified"
"unclassified":"Unclassified",
"max_download_task_running_count": "Max download task running count"
}
27 changes: 14 additions & 13 deletions lib/l10n/intl_zh.arb
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@
"manga": "漫画",
"medium": "中等",
"mode_list": "每日 男性向 女性向 原创 新人 每周 每月 XVIII XVIII_WEEK XVIII_G",
"novel_mode_list":"每日 男性向 女性向 每周 XVIII XVIII_WEEK XVIII_G",
"novel_mode_list": "每日 男性向 女性向 每周 XVIII XVIII_WEEK XVIII_G",
"more": "更多",
"more_then_starnum_bookmark": "超过 {starNum} 的收藏",
"@more_then_starnum_bookmark": {
Expand Down Expand Up @@ -153,8 +153,8 @@
"description": "A message with a parameter",
"placeholders": {
"name": {
"type": "String",
"example": "Bob"
"type": "String",
"example": "Bob"
}
}
},
Expand Down Expand Up @@ -190,13 +190,13 @@
"pick_a_color": "选择颜色",
"tap_to_show_results": "点击显示 {length} 个结果",
"@tap_to_show_results": {
"description": "A message with a single parameter",
"placeholders": {
"length": {
"type": "String",
"example": "Bob"
}
"description": "A message with a single parameter",
"placeholders": {
"length": {
"type": "String",
"example": "Bob"
}
}
},
"saf_hint": "以 SAF 模式保存图片或其他文件,无需存储权限\n虽然不授权仍然能够继续使用,但可能会导致 app 闪退或者部分功能不可用\n注意:如遇到兼容性问题(无法选择等,常见于国产魔改系统),请使用上方的“传统方式”。\n非常推荐选择 Pictures/PixEz 作为保存位置",
"what_is_saf": "什么是 SAF?",
Expand Down Expand Up @@ -234,8 +234,8 @@
"login_error_message": "账号或密码错误,或使用了弱密码,将可能导致登录失败",
"translate": "翻译",
"retry_seed_task": "重试所有seed任务",
"manga_detail_page_quality":"漫画详情页画质",
"follow_after_star":"收藏后关注画师",
"manga_detail_page_quality": "漫画详情页画质",
"follow_after_star": "收藏后关注画师",
"default_title": "默认",
"image_site": "图床",
"network": "网络",
Expand All @@ -245,5 +245,6 @@
"copy": "复制",
"view_replies": "查看回复",
"temporarily_visible": "暂时可见",
"unclassified":"未分类"
}
"unclassified": "未分类",
"max_download_task_running_count": "最大同时下载任务数量"
}
27 changes: 14 additions & 13 deletions lib/l10n/intl_zh_CN.arb
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@
"manga": "漫画",
"medium": "中等",
"mode_list": "每日 男性向 女性向 原创 新人 每周 每月 XVIII XVIII_WEEK XVIII_G",
"novel_mode_list":"每日 男性向 女性向 每周 XVIII XVIII_WEEK XVIII_G",
"novel_mode_list": "每日 男性向 女性向 每周 XVIII XVIII_WEEK XVIII_G",
"more": "更多",
"more_then_starnum_bookmark": "超过 {starNum} 的收藏",
"@more_then_starnum_bookmark": {
Expand Down Expand Up @@ -153,8 +153,8 @@
"description": "A message with a parameter",
"placeholders": {
"name": {
"type": "String",
"example": "Bob"
"type": "String",
"example": "Bob"
}
}
},
Expand Down Expand Up @@ -190,13 +190,13 @@
"pick_a_color": "选择颜色",
"tap_to_show_results": "点击显示 {length} 个结果",
"@tap_to_show_results": {
"description": "A message with a single parameter",
"placeholders": {
"length": {
"type": "String",
"example": "Bob"
}
"description": "A message with a single parameter",
"placeholders": {
"length": {
"type": "String",
"example": "Bob"
}
}
},
"saf_hint": "以 SAF 模式保存图片或其他文件,无需存储权限\n虽然不授权仍然能够继续使用,但可能会导致 app 闪退或者部分功能不可用\n注意:如遇到兼容性问题(无法选择等,常见于国产魔改系统),请使用上方的“传统方式”。\n非常推荐选择 Pictures/PixEz 作为保存位置",
"what_is_saf": "什么是 SAF?",
Expand Down Expand Up @@ -234,8 +234,8 @@
"login_error_message": "账号或密码错误,或使用了弱密码,将可能导致登录失败",
"translate": "翻译",
"retry_seed_task": "重试所有seed任务",
"manga_detail_page_quality":"漫画详情页画质",
"follow_after_star":"收藏后关注画师",
"manga_detail_page_quality": "漫画详情页画质",
"follow_after_star": "收藏后关注画师",
"default_title": "默认",
"image_site": "图床",
"network": "网络",
Expand All @@ -245,5 +245,6 @@
"copy": "复制",
"view_replies": "查看回复",
"temporarily_visible": "暂时可见",
"unclassified":"未分类"
}
"unclassified": "未分类",
"max_download_task_running_count": "最大同时下载任务数量"
}
3 changes: 2 additions & 1 deletion lib/l10n/intl_zh_TW.arb
Original file line number Diff line number Diff line change
Expand Up @@ -245,5 +245,6 @@
"copy": "複製",
"view_replies": "預覽回覆",
"temporarily_visible": "暫時可見",
"unclassified":"未分類"
"unclassified":"未分類",
"max_download_task_running_count": "最大同時下載任務數量"
}
46 changes: 46 additions & 0 deletions lib/page/hello/setting/setting_quality_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -563,6 +563,52 @@ class _SettingQualityPageState extends State<SettingQualityPage>
),
),
),
Padding(
padding: const EdgeInsets.all(8.0),
child: Card(
child: Column(
children: <Widget>[
Padding(
child:
Text(I18n.of(context).max_download_task_running_count),
padding: EdgeInsets.all(16),
),
Observer(builder: (_) {
return TabBar(
labelColor: Theme.of(context).textTheme.headline6!.color,
indicatorSize: TabBarIndicatorSize.label,
indicatorColor: Theme.of(context).accentColor,
indicator: MD2Indicator(
indicatorHeight: 3,
indicatorColor: Theme.of(context).accentColor,
indicatorSize: MD2IndicatorSize.normal),
tabs: [
Tab(
text: '1',
),
Tab(
text: '2',
),
Tab(
text: '3',
),
Tab(
text: '4',
),
],
onTap: (index) {
userSetting.setMaxRunningTask(index + 1);
},
controller: TabController(
length: 4,
vsync: this,
initialIndex: userSetting.maxRunningTask - 1),
);
}),
],
),
),
),
Padding(
padding: const EdgeInsets.all(8.0),
child: Card(
Expand Down
Loading

0 comments on commit 298e88a

Please sign in to comment.