mirror of
https://github.com/kodjodevf/mangayomi.git
synced 2026-01-11 22:40:36 +00:00
Compare commits
4 commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
89dd50dc25 | ||
|
|
1f3fe65945 | ||
|
|
88f8d7b4be | ||
|
|
83b7d31e0a |
6 changed files with 54 additions and 24 deletions
7
.github/workflows/release.yml
vendored
7
.github/workflows/release.yml
vendored
|
|
@ -71,13 +71,6 @@ jobs:
|
|||
mv app-armeabi-v7a-release.apk Mangayomi-${{ github.ref_name }}-android-armeabi-v7a.apk
|
||||
mv app-x86_64-release.apk Mangayomi-${{ github.ref_name }}-android-x86_64.apk
|
||||
|
||||
- name: build android apk (all architectures)
|
||||
run: |
|
||||
export GRADLE_OPTS="-Xmx4096m -XX:MaxMetaspaceSize=512m -XX:+UseG1GC"
|
||||
flutter build apk --release --verbose
|
||||
cd build/app/outputs/flutter-apk
|
||||
mv app-release.apk Mangayomi-${{ github.ref_name }}-android-universal.apk
|
||||
|
||||
- name: upload artifact android apks
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
|
|
|
|||
|
|
@ -84,9 +84,7 @@ void main(List<String> args) async {
|
|||
|
||||
Future<void> _postLaunchInit(StorageProvider storage) async {
|
||||
await AppLogger.init();
|
||||
// Initialiser le pool d'Isolates partagé (3 workers)
|
||||
// Optimise la mémoire pour 50+ téléchargements simultanés
|
||||
unawaited(MDownloader.initializeIsolatePool(poolSize: 3));
|
||||
unawaited(MDownloader.initializeIsolatePool(poolSize: 6));
|
||||
final hivePath = (Platform.isIOS || Platform.isMacOS)
|
||||
? "databases"
|
||||
: p.join("Mangayomi", "databases");
|
||||
|
|
|
|||
|
|
@ -24,9 +24,9 @@ class DownloadIsolatePool {
|
|||
static DownloadIsolatePool? _instance;
|
||||
final List<_PoolWorker> _workers = [];
|
||||
final Queue<_DownloadTask> _taskQueue = Queue();
|
||||
final Set<int> _availableWorkers = {}; // Track available workers by index
|
||||
final int poolSize;
|
||||
bool _initialized = false;
|
||||
int _activeWorkers = 0;
|
||||
|
||||
DownloadIsolatePool._({this.poolSize = 3});
|
||||
|
||||
|
|
@ -58,6 +58,7 @@ class DownloadIsolatePool {
|
|||
for (int i = 0; i < poolSize; i++) {
|
||||
final worker = await _PoolWorker.create(i);
|
||||
_workers.add(worker);
|
||||
_availableWorkers.add(i); // All workers start as available
|
||||
}
|
||||
|
||||
_initialized = true;
|
||||
|
|
@ -187,13 +188,25 @@ class DownloadIsolatePool {
|
|||
|
||||
/// Process the task queue
|
||||
void _processQueue() {
|
||||
while (_taskQueue.isNotEmpty && _activeWorkers < _workers.length) {
|
||||
while (_taskQueue.isNotEmpty && _availableWorkers.isNotEmpty) {
|
||||
final task = _taskQueue.removeFirst();
|
||||
final worker = _workers[_activeWorkers];
|
||||
_activeWorkers++;
|
||||
final workerIndex = _availableWorkers.first;
|
||||
_availableWorkers.remove(workerIndex);
|
||||
final worker = _workers[workerIndex];
|
||||
|
||||
if (kDebugMode) {
|
||||
print(
|
||||
'[DownloadPool] Worker $workerIndex starting task ${task.taskId}',
|
||||
);
|
||||
}
|
||||
|
||||
worker.executeTask(task).then((_) {
|
||||
_activeWorkers--;
|
||||
_availableWorkers.add(workerIndex); // Worker is free again
|
||||
if (kDebugMode) {
|
||||
print(
|
||||
'[DownloadPool] Worker $workerIndex finished task ${task.taskId}, available workers: ${_availableWorkers.length}',
|
||||
);
|
||||
}
|
||||
_processQueue(); // Process the next task
|
||||
});
|
||||
}
|
||||
|
|
@ -203,7 +216,7 @@ class DownloadIsolatePool {
|
|||
int get pendingTasks => _taskQueue.length;
|
||||
|
||||
/// Number of active workers
|
||||
int get activeWorkers => _activeWorkers;
|
||||
int get activeWorkers => poolSize - _availableWorkers.length;
|
||||
|
||||
/// Close the pool
|
||||
void dispose() {
|
||||
|
|
@ -212,9 +225,9 @@ class DownloadIsolatePool {
|
|||
}
|
||||
_workers.clear();
|
||||
_taskQueue.clear();
|
||||
_availableWorkers.clear();
|
||||
downloadTaskCancellation.clear();
|
||||
_initialized = false;
|
||||
_activeWorkers = 0;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -43,7 +43,8 @@ class MDownloader {
|
|||
}
|
||||
|
||||
/// Initialize the Isolate pool (call once at app startup)
|
||||
static Future<void> initializeIsolatePool({int poolSize = 3}) async {
|
||||
/// poolSize = 6 workers allows 6 chapters to download in parallel
|
||||
static Future<void> initializeIsolatePool({int poolSize = 6}) async {
|
||||
DownloadIsolatePool.configure(poolSize: poolSize);
|
||||
await DownloadIsolatePool.instance.initialize();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
name: mangayomi
|
||||
description: Free and open source manga reader and anime streaming cross-plateform app inspired by Tachiyomi and Aniyomi.
|
||||
publish_to: "none"
|
||||
version: 0.6.95+95
|
||||
version: 0.7.0+96
|
||||
|
||||
environment:
|
||||
sdk: ^3.10.4
|
||||
|
|
|
|||
|
|
@ -14,25 +14,39 @@
|
|||
"bundleIdentifier": "com.kodjodevf.mangayomi",
|
||||
"developerName": "Moustapha Kodjo Amadou",
|
||||
"subtitle": "Read manga, novels, and watch anime",
|
||||
"version": "0.6.90",
|
||||
"versionDate": "2025-12-23T18:21:22Z",
|
||||
"version": "0.7.0",
|
||||
"versionDate": "2026-01-09T10:56:42Z",
|
||||
"versionDescription": "",
|
||||
"downloadURL": "https://github.com/kodjodevf/mangayomi/releases/download/v0.6.90/Mangayomi-v0.6.90-ios.ipa",
|
||||
"downloadURL": "https://github.com/kodjodevf/mangayomi/releases/download/v0.7.0/Mangayomi-v0.7.0-ios.ipa",
|
||||
"localizedDescription": "Mangayomi is an open-source Flutter app for reading manga, novels, and watching anime across multiple platforms.",
|
||||
"iconURL": "https://raw.githubusercontent.com/kodjodevf/mangayomi/refs/heads/main/repo/images/icons/icon_default.webp",
|
||||
"tintColor": "EF4444",
|
||||
"category": "entertainment",
|
||||
"size": 45074046,
|
||||
"size": 45269466,
|
||||
"screenshotURLs": [
|
||||
"https://raw.githubusercontent.com/kodjodevf/mangayomi/refs/heads/main/repo/images/screenshots/image_0_default.webp",
|
||||
"https://raw.githubusercontent.com/kodjodevf/mangayomi/refs/heads/main/repo/images/screenshots/image_1_default.webp",
|
||||
"https://raw.githubusercontent.com/kodjodevf/mangayomi/refs/heads/main/repo/images/screenshots/image_2_default.webp"
|
||||
],
|
||||
"versions": [
|
||||
{
|
||||
"version": "0.7.0",
|
||||
"date": "2026-01-09T10:56:42Z",
|
||||
"localizedDescription": "",
|
||||
"downloadURL": "https://github.com/kodjodevf/mangayomi/releases/download/v0.7.0/Mangayomi-v0.7.0-ios.ipa",
|
||||
"size": 45269466
|
||||
},
|
||||
{
|
||||
"version": "0.6.95",
|
||||
"date": "2026-01-08T13:43:16Z",
|
||||
"localizedDescription": "What's Changed\r\n* Fix \"Show extensions\" Button AND Fix category rearrange bug AND hide ItemType from calendar by @NBA2K1 in https://github.com/kodjodevf/mangayomi/pull/636\r\n* Add a force landscape mode on mobile by @686udjie in https://github.com/kodjodevf/mangayomi/pull/638\r\n* Fix 637: Importing .epub doesn\u2019t work\r\n* Enhance category management with animation\r\n* Refactor download management with shared isolate pool and optimize concurrent downloads\r\n\r\nNew Contributors\r\n* @686udjie made their first contribution in https://github.com/kodjodevf/mangayomi/pull/638\r\n\r\n**Full Changelog**: https://github.com/kodjodevf/mangayomi/compare/v0.6.90...v0.6.95",
|
||||
"downloadURL": "https://github.com/kodjodevf/mangayomi/releases/download/v0.6.95/Mangayomi-v0.6.95-ios.ipa",
|
||||
"size": 45267048
|
||||
},
|
||||
{
|
||||
"version": "0.6.90",
|
||||
"date": "2025-12-23T18:21:22Z",
|
||||
"localizedDescription": "",
|
||||
"localizedDescription": "What's Changed\r\n* Add log switch to about\u2022menu by @NBA2K1 in https://github.com/kodjodevf/mangayomi/pull/629\r\n* Path optimizations by @NBA2K1 in https://github.com/kodjodevf/mangayomi/pull/632\r\n* fix: show chanded source preference for mihon source\r\n* Chapter jump fix in vertical continuous mode\r\n* some fixes\r\n\r\n\r\n**Full Changelog**: https://github.com/kodjodevf/mangayomi/compare/v0.6.85...v0.6.90",
|
||||
"downloadURL": "https://github.com/kodjodevf/mangayomi/releases/download/v0.6.90/Mangayomi-v0.6.90-ios.ipa",
|
||||
"size": 45074046
|
||||
},
|
||||
|
|
@ -333,6 +347,17 @@
|
|||
"imageURL": "https://raw.githubusercontent.com/kodjodevf/mangayomi/refs/heads/main/repo/images/news/update_default.webp",
|
||||
"notify": true,
|
||||
"url": "https://github.com/kodjodevf/mangayomi/releases/tag/v0.6.90"
|
||||
},
|
||||
{
|
||||
"appID": "com.kodjodevf.mangayomi",
|
||||
"title": "0.7.0 - 09 Jan",
|
||||
"identifier": "release-0.7.0",
|
||||
"caption": "Update for Mangayomi now available!",
|
||||
"date": "2026-01-09T10:56:42Z",
|
||||
"tintColor": "EF4444",
|
||||
"imageURL": "https://raw.githubusercontent.com/kodjodevf/mangayomi/refs/heads/main/repo/images/news/update_default.webp",
|
||||
"notify": true,
|
||||
"url": "https://github.com/kodjodevf/mangayomi/releases/tag/v0.7.0"
|
||||
}
|
||||
]
|
||||
}
|
||||
Loading…
Reference in a new issue