Added new jar and support for manga (tachiyomi)
This commit is contained in:
Binary file not shown.
@@ -6,8 +6,9 @@ void main() async {
|
|||||||
WidgetsFlutterBinding.ensureInitialized();
|
WidgetsFlutterBinding.ensureInitialized();
|
||||||
|
|
||||||
AniyomiBridge bridge = AniyomiBridge();
|
AniyomiBridge bridge = AniyomiBridge();
|
||||||
bridge.loadExtension("https://kohiden.xyz/Kohi-den/extensions/raw/branch/main/apk/aniyomi-all.animeonsen-v14.7.apk");
|
await Future.delayed(Duration(seconds: 2));
|
||||||
List<JSAnime> animes = bridge.getSearchResults("Shingeki", 1, "animeonsen");
|
bridge.loadAnimeExtension("https://kohiden.xyz/Kohi-den/extensions/raw/branch/main/apk/aniyomi-all.animeonsen-v14.7.apk");
|
||||||
|
List<JSAnime> animes = bridge.getAnimeSearchResults("Shingeki", 1, "animeonsen");
|
||||||
print(animes);
|
print(animes);
|
||||||
animes.forEach((anime) => print(anime.getTitle().toDartString()));
|
animes.forEach((anime) => print(anime.getTitle().toDartString()));
|
||||||
|
|
||||||
|
|||||||
28
installJRE.sh
Normal file → Executable file
28
installJRE.sh
Normal file → Executable file
@@ -1,10 +1,6 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
# Usage: ./setup_jre.sh <platform>
|
|
||||||
# Example: ./setup_jre.sh macos
|
|
||||||
|
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
PLATFORM=$1
|
PLATFORM=$1
|
||||||
|
|
||||||
if [ -z "$PLATFORM" ]; then
|
if [ -z "$PLATFORM" ]; then
|
||||||
@@ -13,16 +9,15 @@ if [ -z "$PLATFORM" ]; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
PROJECT_DIR=$(pwd)
|
PROJECT_DIR=$(pwd)
|
||||||
JRE_SRC="$PROJECT_DIR/jre/$PLATFORM/customjre"
|
|
||||||
|
|
||||||
if [ ! -d "$JRE_SRC" ]; then
|
|
||||||
echo "Error: JRE source folder not found: $JRE_SRC"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
case "$PLATFORM" in
|
case "$PLATFORM" in
|
||||||
macos)
|
macos)
|
||||||
# Locate Flutter macOS build output
|
# Locate Flutter macOS build output
|
||||||
|
JRE_SRC="/Users/kevin/IdeaProjects/k3vinb5_aniyomi_bridge/jre/$PLATFORM/customjre"
|
||||||
|
if [ ! -d "$JRE_SRC" ]; then
|
||||||
|
echo "Error: JRE source folder not found: $JRE_SRC"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
APP_BUNDLE="$PROJECT_DIR/build/macos/Build/Products/Debug/Runner.app"
|
APP_BUNDLE="$PROJECT_DIR/build/macos/Build/Products/Debug/Runner.app"
|
||||||
RESOURCES_DIR="$APP_BUNDLE/Contents/Resources"
|
RESOURCES_DIR="$APP_BUNDLE/Contents/Resources"
|
||||||
mkdir -p "$RESOURCES_DIR/jre"
|
mkdir -p "$RESOURCES_DIR/jre"
|
||||||
@@ -32,20 +27,17 @@ case "$PLATFORM" in
|
|||||||
|
|
||||||
linux)
|
linux)
|
||||||
# Linux Flutter executable folder
|
# Linux Flutter executable folder
|
||||||
|
JRE_SRC="/home/kevin/Projects/k3vinb5_aniyomi_bridge/jre/$PLATFORM/customjre"
|
||||||
|
if [ ! -d "$JRE_SRC" ]; then
|
||||||
|
echo "Error: JRE source folder not found: $JRE_SRC"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
BUILD_DIR="$PROJECT_DIR/build/linux/x64/debug/bundle"
|
BUILD_DIR="$PROJECT_DIR/build/linux/x64/debug/bundle"
|
||||||
mkdir -p "$BUILD_DIR/jre"
|
mkdir -p "$BUILD_DIR/jre"
|
||||||
cp -R "$JRE_SRC" "$BUILD_DIR/jre/"
|
cp -R "$JRE_SRC" "$BUILD_DIR/jre/"
|
||||||
echo "Copied custom JRE to $BUILD_DIR/jre/"
|
echo "Copied custom JRE to $BUILD_DIR/jre/"
|
||||||
;;
|
;;
|
||||||
|
|
||||||
windows)
|
|
||||||
# Windows Flutter executable folder
|
|
||||||
BUILD_DIR="$PROJECT_DIR/build/windows/runner/Debug"
|
|
||||||
mkdir -p "$BUILD_DIR/jre"
|
|
||||||
cp -R "$JRE_SRC" "$BUILD_DIR/jre/"
|
|
||||||
echo "Copied custom JRE to $BUILD_DIR/jre/"
|
|
||||||
;;
|
|
||||||
|
|
||||||
*)
|
*)
|
||||||
echo "Unsupported platform: $PLATFORM"
|
echo "Unsupported platform: $PLATFORM"
|
||||||
exit 1
|
exit 1
|
||||||
|
|||||||
9
jnigen/page.yaml
Normal file
9
jnigen/page.yaml
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
output:
|
||||||
|
dart:
|
||||||
|
path: ../lib/jmodels/jpage.dart
|
||||||
|
structure: single_file
|
||||||
|
|
||||||
|
class_path:
|
||||||
|
- '../assets/aniyomibridge-core.jar'
|
||||||
|
classes:
|
||||||
|
- 'eu.kanade.tachiyomi.source.model.Page'
|
||||||
9
jnigen/schapter.yaml
Normal file
9
jnigen/schapter.yaml
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
output:
|
||||||
|
dart:
|
||||||
|
path: ../lib/jmodels/jschapter.dart
|
||||||
|
structure: single_file
|
||||||
|
|
||||||
|
class_path:
|
||||||
|
- '../assets/aniyomibridge-core.jar'
|
||||||
|
classes:
|
||||||
|
- 'eu.kanade.tachiyomi.source.model.SChapter'
|
||||||
9
jnigen/smanga.yaml
Normal file
9
jnigen/smanga.yaml
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
output:
|
||||||
|
dart:
|
||||||
|
path: ../lib/jmodels/jsmanga.dart
|
||||||
|
structure: single_file
|
||||||
|
|
||||||
|
class_path:
|
||||||
|
- '../assets/aniyomibridge-core.jar'
|
||||||
|
classes:
|
||||||
|
- 'eu.kanade.tachiyomi.source.model.SManga'
|
||||||
@@ -1,19 +1,25 @@
|
|||||||
import 'dart:io';
|
import 'dart:io';
|
||||||
import 'package:flutter/services.dart';
|
import 'package:flutter/services.dart';
|
||||||
import 'package:k3vinb5_aniyomi_bridge/jmodels/jvideo.dart';
|
import 'package:jni/jni.dart';
|
||||||
import 'package:path_provider/path_provider.dart';
|
import 'package:path_provider/path_provider.dart';
|
||||||
import 'package:path/path.dart' as path;
|
import 'package:path/path.dart' as path;
|
||||||
import 'package:jni/jni.dart';
|
import 'package:k3vinb5_aniyomi_bridge/jmodels/jvideo.dart';
|
||||||
import 'package:k3vinb5_aniyomi_bridge/jmodels/janiyomibridge.dart';
|
import 'package:k3vinb5_aniyomi_bridge/jmodels/janiyomibridge.dart';
|
||||||
import 'package:k3vinb5_aniyomi_bridge/jmodels/jsanime.dart';
|
import 'package:k3vinb5_aniyomi_bridge/jmodels/jsanime.dart';
|
||||||
import 'package:k3vinb5_aniyomi_bridge/jmodels/jsepisode.dart';
|
import 'package:k3vinb5_aniyomi_bridge/jmodels/jsepisode.dart';
|
||||||
|
import 'package:k3vinb5_aniyomi_bridge/jmodels/jsmanga.dart';
|
||||||
|
import 'package:k3vinb5_aniyomi_bridge/jmodels/jschapter.dart';
|
||||||
|
import 'package:k3vinb5_aniyomi_bridge/jmodels/jpage.dart';
|
||||||
|
|
||||||
class AniyomiBridge {
|
class AniyomiBridge {
|
||||||
|
|
||||||
static final _aniyomiBridgeDir = "aniyomibridge";
|
static const String _aniyomiBridgeDir = "aniyomibridge";
|
||||||
static late final String _applicationSupportDirectory;
|
static const String _aniyomiBridgeAnimeExtensionsDir = "animeExtensions";
|
||||||
static final _packageAssetsDir = "packages/k3vinb5_aniyomi_bridge/assets";
|
static const String _aniyomiBridgeMangaExtensionsDir = "mangaExtensions";
|
||||||
|
static const String _aniyomiBridgeJarName ="aniyomibridge-core.jar";
|
||||||
|
static const String _packageAssetsDir = "packages/k3vinb5_aniyomi_bridge/assets";
|
||||||
static late final JAniyomiBridge _jAniyomiBridge;
|
static late final JAniyomiBridge _jAniyomiBridge;
|
||||||
|
static late final String _supportDirectoryPath;
|
||||||
|
|
||||||
AniyomiBridge() {
|
AniyomiBridge() {
|
||||||
_initJvm();
|
_initJvm();
|
||||||
@@ -21,6 +27,7 @@ class AniyomiBridge {
|
|||||||
|
|
||||||
Future<void> _initJvm() async {
|
Future<void> _initJvm() async {
|
||||||
Directory supportDirectory = await getApplicationSupportDirectory();
|
Directory supportDirectory = await getApplicationSupportDirectory();
|
||||||
|
_supportDirectoryPath = supportDirectory.path;
|
||||||
await _loadJarIfNeeded(supportDirectory);
|
await _loadJarIfNeeded(supportDirectory);
|
||||||
Jni.spawn(
|
Jni.spawn(
|
||||||
dylibDir: _getDylibDir(supportDirectory),
|
dylibDir: _getDylibDir(supportDirectory),
|
||||||
@@ -28,17 +35,24 @@ class AniyomiBridge {
|
|||||||
);
|
);
|
||||||
JAniyomiBridge.init();
|
JAniyomiBridge.init();
|
||||||
_jAniyomiBridge = JAniyomiBridge();
|
_jAniyomiBridge = JAniyomiBridge();
|
||||||
_applicationSupportDirectory = supportDirectory.path;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
List<JSAnime> getSearchResults(String query, int page, String source) {
|
List<JSAnime> getAnimeSearchResults(String query, int page, String source) {
|
||||||
JList<JObject?>? searchResults = _jAniyomiBridge.getSearchResults(JString.fromString(query), page, JString.fromString(source));
|
JList<JObject?>? searchResults = _jAniyomiBridge.getAnimeSearchResults(JString.fromString(query), page, JString.fromString(source));
|
||||||
if (searchResults == null) {
|
if (searchResults == null) {
|
||||||
return [];
|
return [];
|
||||||
}
|
}
|
||||||
return searchResults.cast<JObject?>().where(_jObjIsNotNull).map((jObj) => jObj!.as<JSAnime>(JSAnime.type)).toList();
|
return searchResults.cast<JObject?>().where(_jObjIsNotNull).map((jObj) => jObj!.as<JSAnime>(JSAnime.type)).toList();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
List<JSManga> getMangaSearchResults(String query, int page, String source) {
|
||||||
|
JList<JObject?>? searchResults = _jAniyomiBridge.getMangaSearchResults(JString.fromString(query), page, JString.fromString(source));
|
||||||
|
if (searchResults == null) {
|
||||||
|
return [];
|
||||||
|
}
|
||||||
|
return searchResults.cast<JObject?>().where(_jObjIsNotNull).map((jObj) => jObj!.as<JSManga>(JSManga.type)).toList();
|
||||||
|
}
|
||||||
|
|
||||||
List<JSEpisode> getEpisodeList(JSAnime sAnime, String source) {
|
List<JSEpisode> getEpisodeList(JSAnime sAnime, String source) {
|
||||||
JList<JObject?>? episodeList = _jAniyomiBridge.getEpisodeList(sAnime, JString.fromString(source));
|
JList<JObject?>? episodeList = _jAniyomiBridge.getEpisodeList(sAnime, JString.fromString(source));
|
||||||
if (episodeList == null) {
|
if (episodeList == null) {
|
||||||
@@ -47,6 +61,14 @@ class AniyomiBridge {
|
|||||||
return episodeList.cast<JObject?>().where(_jObjIsNotNull).map((jObj) => jObj!.as<JSEpisode>(JSEpisode.type)).toList();
|
return episodeList.cast<JObject?>().where(_jObjIsNotNull).map((jObj) => jObj!.as<JSEpisode>(JSEpisode.type)).toList();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
List<JSChapter> getChapterList(JSManga sManga, String source) {
|
||||||
|
JList<JObject?>? episodeList = _jAniyomiBridge.getEpisodeList(sManga, JString.fromString(source));
|
||||||
|
if (episodeList == null) {
|
||||||
|
return [];
|
||||||
|
}
|
||||||
|
return episodeList.cast<JObject?>().where(_jObjIsNotNull).map((jObj) => jObj!.as<JSChapter>(JSChapter.type)).toList();
|
||||||
|
}
|
||||||
|
|
||||||
List<JVideo> getVideoList(JSEpisode sEpisode, String source) {
|
List<JVideo> getVideoList(JSEpisode sEpisode, String source) {
|
||||||
JList<JObject?>? videoList = _jAniyomiBridge.getVideoList(sEpisode, JString.fromString(source));
|
JList<JObject?>? videoList = _jAniyomiBridge.getVideoList(sEpisode, JString.fromString(source));
|
||||||
if (videoList == null) {
|
if (videoList == null) {
|
||||||
@@ -55,19 +77,39 @@ class AniyomiBridge {
|
|||||||
return videoList.cast<JObject?>().where(_jObjIsNotNull).map((jObj) => jObj!.as<JVideo>(JVideo.type)).toList();
|
return videoList.cast<JObject?>().where(_jObjIsNotNull).map((jObj) => jObj!.as<JVideo>(JVideo.type)).toList();
|
||||||
}
|
}
|
||||||
|
|
||||||
void loadExtension(String extensionUrl) {
|
List<JPage> getPageList(JSChapter sChapter, String source) {
|
||||||
_jAniyomiBridge.loadExtension(JString.fromString(extensionUrl));
|
JList<JObject?>? videoList = _jAniyomiBridge.getVideoList(sChapter, JString.fromString(source));
|
||||||
|
if (videoList == null) {
|
||||||
|
return [];
|
||||||
|
}
|
||||||
|
return videoList.cast<JObject?>().where(_jObjIsNotNull).map((jObj) => jObj!.as<JPage>(JPage.type)).toList();
|
||||||
}
|
}
|
||||||
|
|
||||||
List<String>? getLoadedExtensions() {
|
void loadAnimeExtension(String extensionUrl) {
|
||||||
JList<JString?>? loadedExtensions = _jAniyomiBridge.getLoadedExtensions();
|
_jAniyomiBridge.loadAnimeExtension(JString.fromString(extensionUrl), JString.fromString(path.join(_supportDirectoryPath, _aniyomiBridgeAnimeExtensionsDir)));
|
||||||
|
}
|
||||||
|
|
||||||
|
void loadMangaExtension(String extensionUrl) {
|
||||||
|
_jAniyomiBridge.loadMangaExtension(JString.fromString(extensionUrl), JString.fromString(path.join(_supportDirectoryPath, _aniyomiBridgeMangaExtensionsDir)));
|
||||||
|
}
|
||||||
|
|
||||||
|
List<String>? getLoadedAnimeExtensions() {
|
||||||
|
JList<JString?>? loadedExtensions = _jAniyomiBridge.getAnimeLoadedExtensions();
|
||||||
if (loadedExtensions == null) {
|
if (loadedExtensions == null) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
return loadedExtensions.cast<JString>().map((jStr) => jStr.toDartString()).toList();
|
return loadedExtensions.cast<JString>().map((jStr) => jStr.toDartString()).toList();
|
||||||
}
|
}
|
||||||
|
|
||||||
bool Function(JObject? jObj) get _jObjIsNotNull => (jObj) => jObj != null;
|
List<String>? getLoadedMangaExtensions() {
|
||||||
|
JList<JString?>? loadedExtensions = _jAniyomiBridge.getMangaLoadedExtensions();
|
||||||
|
if (loadedExtensions == null) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
return loadedExtensions.cast<JString>().map((jStr) => jStr.toDartString()).toList();
|
||||||
|
}
|
||||||
|
|
||||||
|
bool Function(JObject? jObj) get _jObjIsNotNull => (jObj) => jObj != null;
|
||||||
|
|
||||||
String _getDylibDir(Directory supportDirectory) {
|
String _getDylibDir(Directory supportDirectory) {
|
||||||
String executablePath = File(Platform.resolvedExecutable).parent.path;
|
String executablePath = File(Platform.resolvedExecutable).parent.path;
|
||||||
@@ -83,15 +125,14 @@ class AniyomiBridge {
|
|||||||
}
|
}
|
||||||
|
|
||||||
List<String> _getClassPath(Directory supportDirectory) {
|
List<String> _getClassPath(Directory supportDirectory) {
|
||||||
return [path.join(supportDirectory.absolute.path, _aniyomiBridgeDir, "aniyomibridge-core.jar")];
|
return [path.join(supportDirectory.absolute.path, _aniyomiBridgeDir, _aniyomiBridgeJarName)];
|
||||||
}
|
}
|
||||||
|
|
||||||
Future<void> _loadJarIfNeeded(Directory supportDirectory) async {
|
Future<void> _loadJarIfNeeded(Directory supportDirectory) async {
|
||||||
String aniyomiBridgeCorePath = path.join(supportDirectory.path, _aniyomiBridgeDir, "aniyomibridge-core.jar");
|
String aniyomiBridgeCorePath = path.join(supportDirectory.path, _aniyomiBridgeDir, _aniyomiBridgeJarName);
|
||||||
File aniyomiBridgeCore = File(aniyomiBridgeCorePath);
|
File aniyomiBridgeCore = File(aniyomiBridgeCorePath);
|
||||||
if (!(await aniyomiBridgeCore.exists())) {
|
if (!(await aniyomiBridgeCore.exists())) {
|
||||||
print("Copying aniyomibridge-core.jar to $aniyomiBridgeCorePath");
|
_copyAssetToFile("$_packageAssetsDir/$_aniyomiBridgeJarName", aniyomiBridgeCorePath);
|
||||||
_copyAssetToFile("$_packageAssetsDir/aniyomibridge-core.jar", aniyomiBridgeCorePath);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -113,45 +113,12 @@ class JAniyomiBridge extends jni$_.JObject {
|
|||||||
_init(_class.reference.pointer, _id_init as jni$_.JMethodIDPtr).check();
|
_init(_class.reference.pointer, _id_init as jni$_.JMethodIDPtr).check();
|
||||||
}
|
}
|
||||||
|
|
||||||
static final _id_loadExtension = _class.instanceMethodId(
|
static final _id_loadAnimeExtension = _class.instanceMethodId(
|
||||||
r'loadExtension',
|
r'loadAnimeExtension',
|
||||||
r'(Ljava/lang/String;)V',
|
|
||||||
);
|
|
||||||
|
|
||||||
static final _loadExtension =
|
|
||||||
jni$_.ProtectedJniExtensions.lookup<
|
|
||||||
jni$_.NativeFunction<
|
|
||||||
jni$_.JThrowablePtr Function(
|
|
||||||
jni$_.Pointer<jni$_.Void>,
|
|
||||||
jni$_.JMethodIDPtr,
|
|
||||||
jni$_.VarArgs<(jni$_.Pointer<jni$_.Void>,)>,
|
|
||||||
)
|
|
||||||
>
|
|
||||||
>('globalEnv_CallVoidMethod')
|
|
||||||
.asFunction<
|
|
||||||
jni$_.JThrowablePtr Function(
|
|
||||||
jni$_.Pointer<jni$_.Void>,
|
|
||||||
jni$_.JMethodIDPtr,
|
|
||||||
jni$_.Pointer<jni$_.Void>,
|
|
||||||
)
|
|
||||||
>();
|
|
||||||
|
|
||||||
/// from: `public void loadExtension(java.lang.String string)`
|
|
||||||
void loadExtension(jni$_.JString? string) {
|
|
||||||
final _$string = string?.reference ?? jni$_.jNullReference;
|
|
||||||
_loadExtension(
|
|
||||||
reference.pointer,
|
|
||||||
_id_loadExtension as jni$_.JMethodIDPtr,
|
|
||||||
_$string.pointer,
|
|
||||||
).check();
|
|
||||||
}
|
|
||||||
|
|
||||||
static final _id_loadExtensionFile = _class.instanceMethodId(
|
|
||||||
r'loadExtensionFile',
|
|
||||||
r'(Ljava/lang/String;Ljava/lang/String;)V',
|
r'(Ljava/lang/String;Ljava/lang/String;)V',
|
||||||
);
|
);
|
||||||
|
|
||||||
static final _loadExtensionFile =
|
static final _loadAnimeExtension =
|
||||||
jni$_.ProtectedJniExtensions.lookup<
|
jni$_.ProtectedJniExtensions.lookup<
|
||||||
jni$_.NativeFunction<
|
jni$_.NativeFunction<
|
||||||
jni$_.JThrowablePtr Function(
|
jni$_.JThrowablePtr Function(
|
||||||
@@ -172,24 +139,62 @@ class JAniyomiBridge extends jni$_.JObject {
|
|||||||
)
|
)
|
||||||
>();
|
>();
|
||||||
|
|
||||||
/// from: `public void loadExtensionFile(java.lang.String string, java.lang.String string1)`
|
/// from: `public void loadAnimeExtension(java.lang.String string, java.lang.String string1)`
|
||||||
void loadExtensionFile(jni$_.JString? string, jni$_.JString? string1) {
|
void loadAnimeExtension(jni$_.JString? string, jni$_.JString? string1) {
|
||||||
final _$string = string?.reference ?? jni$_.jNullReference;
|
final _$string = string?.reference ?? jni$_.jNullReference;
|
||||||
final _$string1 = string1?.reference ?? jni$_.jNullReference;
|
final _$string1 = string1?.reference ?? jni$_.jNullReference;
|
||||||
_loadExtensionFile(
|
_loadAnimeExtension(
|
||||||
reference.pointer,
|
reference.pointer,
|
||||||
_id_loadExtensionFile as jni$_.JMethodIDPtr,
|
_id_loadAnimeExtension as jni$_.JMethodIDPtr,
|
||||||
_$string.pointer,
|
_$string.pointer,
|
||||||
_$string1.pointer,
|
_$string1.pointer,
|
||||||
).check();
|
).check();
|
||||||
}
|
}
|
||||||
|
|
||||||
static final _id_getLoadedExtensions = _class.instanceMethodId(
|
static final _id_loadMangaExtension = _class.instanceMethodId(
|
||||||
r'getLoadedExtensions',
|
r'loadMangaExtension',
|
||||||
|
r'(Ljava/lang/String;Ljava/lang/String;)V',
|
||||||
|
);
|
||||||
|
|
||||||
|
static final _loadMangaExtension =
|
||||||
|
jni$_.ProtectedJniExtensions.lookup<
|
||||||
|
jni$_.NativeFunction<
|
||||||
|
jni$_.JThrowablePtr Function(
|
||||||
|
jni$_.Pointer<jni$_.Void>,
|
||||||
|
jni$_.JMethodIDPtr,
|
||||||
|
jni$_.VarArgs<
|
||||||
|
(jni$_.Pointer<jni$_.Void>, jni$_.Pointer<jni$_.Void>)
|
||||||
|
>,
|
||||||
|
)
|
||||||
|
>
|
||||||
|
>('globalEnv_CallVoidMethod')
|
||||||
|
.asFunction<
|
||||||
|
jni$_.JThrowablePtr Function(
|
||||||
|
jni$_.Pointer<jni$_.Void>,
|
||||||
|
jni$_.JMethodIDPtr,
|
||||||
|
jni$_.Pointer<jni$_.Void>,
|
||||||
|
jni$_.Pointer<jni$_.Void>,
|
||||||
|
)
|
||||||
|
>();
|
||||||
|
|
||||||
|
/// from: `public void loadMangaExtension(java.lang.String string, java.lang.String string1)`
|
||||||
|
void loadMangaExtension(jni$_.JString? string, jni$_.JString? string1) {
|
||||||
|
final _$string = string?.reference ?? jni$_.jNullReference;
|
||||||
|
final _$string1 = string1?.reference ?? jni$_.jNullReference;
|
||||||
|
_loadMangaExtension(
|
||||||
|
reference.pointer,
|
||||||
|
_id_loadMangaExtension as jni$_.JMethodIDPtr,
|
||||||
|
_$string.pointer,
|
||||||
|
_$string1.pointer,
|
||||||
|
).check();
|
||||||
|
}
|
||||||
|
|
||||||
|
static final _id_getAnimeLoadedExtensions = _class.instanceMethodId(
|
||||||
|
r'getAnimeLoadedExtensions',
|
||||||
r'()Ljava/util/List;',
|
r'()Ljava/util/List;',
|
||||||
);
|
);
|
||||||
|
|
||||||
static final _getLoadedExtensions =
|
static final _getAnimeLoadedExtensions =
|
||||||
jni$_.ProtectedJniExtensions.lookup<
|
jni$_.ProtectedJniExtensions.lookup<
|
||||||
jni$_.NativeFunction<
|
jni$_.NativeFunction<
|
||||||
jni$_.JniResult Function(
|
jni$_.JniResult Function(
|
||||||
@@ -205,12 +210,12 @@ class JAniyomiBridge extends jni$_.JObject {
|
|||||||
)
|
)
|
||||||
>();
|
>();
|
||||||
|
|
||||||
/// from: `public java.util.List<java.lang.String> getLoadedExtensions()`
|
/// from: `public java.util.List<java.lang.String> getAnimeLoadedExtensions()`
|
||||||
/// The returned object must be released after use, by calling the [release] method.
|
/// The returned object must be released after use, by calling the [release] method.
|
||||||
jni$_.JList<jni$_.JString?>? getLoadedExtensions() {
|
jni$_.JList<jni$_.JString?>? getAnimeLoadedExtensions() {
|
||||||
return _getLoadedExtensions(
|
return _getAnimeLoadedExtensions(
|
||||||
reference.pointer,
|
reference.pointer,
|
||||||
_id_getLoadedExtensions as jni$_.JMethodIDPtr,
|
_id_getAnimeLoadedExtensions as jni$_.JMethodIDPtr,
|
||||||
).object<jni$_.JList<jni$_.JString?>?>(
|
).object<jni$_.JList<jni$_.JString?>?>(
|
||||||
const jni$_.JListNullableType<jni$_.JString?>(
|
const jni$_.JListNullableType<jni$_.JString?>(
|
||||||
jni$_.JStringNullableType(),
|
jni$_.JStringNullableType(),
|
||||||
@@ -218,12 +223,46 @@ class JAniyomiBridge extends jni$_.JObject {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
static final _id_getSearchResults = _class.instanceMethodId(
|
static final _id_getMangaLoadedExtensions = _class.instanceMethodId(
|
||||||
r'getSearchResults',
|
r'getMangaLoadedExtensions',
|
||||||
|
r'()Ljava/util/List;',
|
||||||
|
);
|
||||||
|
|
||||||
|
static final _getMangaLoadedExtensions =
|
||||||
|
jni$_.ProtectedJniExtensions.lookup<
|
||||||
|
jni$_.NativeFunction<
|
||||||
|
jni$_.JniResult Function(
|
||||||
|
jni$_.Pointer<jni$_.Void>,
|
||||||
|
jni$_.JMethodIDPtr,
|
||||||
|
)
|
||||||
|
>
|
||||||
|
>('globalEnv_CallObjectMethod')
|
||||||
|
.asFunction<
|
||||||
|
jni$_.JniResult Function(
|
||||||
|
jni$_.Pointer<jni$_.Void>,
|
||||||
|
jni$_.JMethodIDPtr,
|
||||||
|
)
|
||||||
|
>();
|
||||||
|
|
||||||
|
/// from: `public java.util.List<java.lang.String> getMangaLoadedExtensions()`
|
||||||
|
/// The returned object must be released after use, by calling the [release] method.
|
||||||
|
jni$_.JList<jni$_.JString?>? getMangaLoadedExtensions() {
|
||||||
|
return _getMangaLoadedExtensions(
|
||||||
|
reference.pointer,
|
||||||
|
_id_getMangaLoadedExtensions as jni$_.JMethodIDPtr,
|
||||||
|
).object<jni$_.JList<jni$_.JString?>?>(
|
||||||
|
const jni$_.JListNullableType<jni$_.JString?>(
|
||||||
|
jni$_.JStringNullableType(),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
static final _id_getAnimeSearchResults = _class.instanceMethodId(
|
||||||
|
r'getAnimeSearchResults',
|
||||||
r'(Ljava/lang/String;ILjava/lang/String;)Ljava/util/List;',
|
r'(Ljava/lang/String;ILjava/lang/String;)Ljava/util/List;',
|
||||||
);
|
);
|
||||||
|
|
||||||
static final _getSearchResults =
|
static final _getAnimeSearchResults =
|
||||||
jni$_.ProtectedJniExtensions.lookup<
|
jni$_.ProtectedJniExtensions.lookup<
|
||||||
jni$_.NativeFunction<
|
jni$_.NativeFunction<
|
||||||
jni$_.JniResult Function(
|
jni$_.JniResult Function(
|
||||||
@@ -249,18 +288,71 @@ class JAniyomiBridge extends jni$_.JObject {
|
|||||||
)
|
)
|
||||||
>();
|
>();
|
||||||
|
|
||||||
/// from: `public java.util.List<eu.kanade.tachiyomi.animesource.model.SAnime> getSearchResults(java.lang.String string, int i, java.lang.String string1)`
|
/// from: `public java.util.List<eu.kanade.tachiyomi.animesource.model.SAnime> getAnimeSearchResults(java.lang.String string, int i, java.lang.String string1)`
|
||||||
/// The returned object must be released after use, by calling the [release] method.
|
/// The returned object must be released after use, by calling the [release] method.
|
||||||
jni$_.JList<jni$_.JObject?>? getSearchResults(
|
jni$_.JList<jni$_.JObject?>? getAnimeSearchResults(
|
||||||
jni$_.JString? string,
|
jni$_.JString? string,
|
||||||
int i,
|
int i,
|
||||||
jni$_.JString? string1,
|
jni$_.JString? string1,
|
||||||
) {
|
) {
|
||||||
final _$string = string?.reference ?? jni$_.jNullReference;
|
final _$string = string?.reference ?? jni$_.jNullReference;
|
||||||
final _$string1 = string1?.reference ?? jni$_.jNullReference;
|
final _$string1 = string1?.reference ?? jni$_.jNullReference;
|
||||||
return _getSearchResults(
|
return _getAnimeSearchResults(
|
||||||
reference.pointer,
|
reference.pointer,
|
||||||
_id_getSearchResults as jni$_.JMethodIDPtr,
|
_id_getAnimeSearchResults as jni$_.JMethodIDPtr,
|
||||||
|
_$string.pointer,
|
||||||
|
i,
|
||||||
|
_$string1.pointer,
|
||||||
|
).object<jni$_.JList<jni$_.JObject?>?>(
|
||||||
|
const jni$_.JListNullableType<jni$_.JObject?>(
|
||||||
|
jni$_.JObjectNullableType(),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
static final _id_getMangaSearchResults = _class.instanceMethodId(
|
||||||
|
r'getMangaSearchResults',
|
||||||
|
r'(Ljava/lang/String;ILjava/lang/String;)Ljava/util/List;',
|
||||||
|
);
|
||||||
|
|
||||||
|
static final _getMangaSearchResults =
|
||||||
|
jni$_.ProtectedJniExtensions.lookup<
|
||||||
|
jni$_.NativeFunction<
|
||||||
|
jni$_.JniResult Function(
|
||||||
|
jni$_.Pointer<jni$_.Void>,
|
||||||
|
jni$_.JMethodIDPtr,
|
||||||
|
jni$_.VarArgs<
|
||||||
|
(
|
||||||
|
jni$_.Pointer<jni$_.Void>,
|
||||||
|
jni$_.Int32,
|
||||||
|
jni$_.Pointer<jni$_.Void>,
|
||||||
|
)
|
||||||
|
>,
|
||||||
|
)
|
||||||
|
>
|
||||||
|
>('globalEnv_CallObjectMethod')
|
||||||
|
.asFunction<
|
||||||
|
jni$_.JniResult Function(
|
||||||
|
jni$_.Pointer<jni$_.Void>,
|
||||||
|
jni$_.JMethodIDPtr,
|
||||||
|
jni$_.Pointer<jni$_.Void>,
|
||||||
|
int,
|
||||||
|
jni$_.Pointer<jni$_.Void>,
|
||||||
|
)
|
||||||
|
>();
|
||||||
|
|
||||||
|
/// from: `public java.util.List<eu.kanade.tachiyomi.source.model.SManga> getMangaSearchResults(java.lang.String string, int i, java.lang.String string1)`
|
||||||
|
/// The returned object must be released after use, by calling the [release] method.
|
||||||
|
jni$_.JList<jni$_.JObject?>? getMangaSearchResults(
|
||||||
|
jni$_.JString? string,
|
||||||
|
int i,
|
||||||
|
jni$_.JString? string1,
|
||||||
|
) {
|
||||||
|
final _$string = string?.reference ?? jni$_.jNullReference;
|
||||||
|
final _$string1 = string1?.reference ?? jni$_.jNullReference;
|
||||||
|
return _getMangaSearchResults(
|
||||||
|
reference.pointer,
|
||||||
|
_id_getMangaSearchResults as jni$_.JMethodIDPtr,
|
||||||
_$string.pointer,
|
_$string.pointer,
|
||||||
i,
|
i,
|
||||||
_$string1.pointer,
|
_$string1.pointer,
|
||||||
@@ -317,6 +409,52 @@ class JAniyomiBridge extends jni$_.JObject {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static final _id_getChapterList = _class.instanceMethodId(
|
||||||
|
r'getChapterList',
|
||||||
|
r'(Leu/kanade/tachiyomi/source/model/SManga;Ljava/lang/String;)Ljava/util/List;',
|
||||||
|
);
|
||||||
|
|
||||||
|
static final _getChapterList =
|
||||||
|
jni$_.ProtectedJniExtensions.lookup<
|
||||||
|
jni$_.NativeFunction<
|
||||||
|
jni$_.JniResult Function(
|
||||||
|
jni$_.Pointer<jni$_.Void>,
|
||||||
|
jni$_.JMethodIDPtr,
|
||||||
|
jni$_.VarArgs<
|
||||||
|
(jni$_.Pointer<jni$_.Void>, jni$_.Pointer<jni$_.Void>)
|
||||||
|
>,
|
||||||
|
)
|
||||||
|
>
|
||||||
|
>('globalEnv_CallObjectMethod')
|
||||||
|
.asFunction<
|
||||||
|
jni$_.JniResult Function(
|
||||||
|
jni$_.Pointer<jni$_.Void>,
|
||||||
|
jni$_.JMethodIDPtr,
|
||||||
|
jni$_.Pointer<jni$_.Void>,
|
||||||
|
jni$_.Pointer<jni$_.Void>,
|
||||||
|
)
|
||||||
|
>();
|
||||||
|
|
||||||
|
/// from: `public java.util.List<eu.kanade.tachiyomi.source.model.SChapter> getChapterList(eu.kanade.tachiyomi.source.model.SManga sManga, java.lang.String string)`
|
||||||
|
/// The returned object must be released after use, by calling the [release] method.
|
||||||
|
jni$_.JList<jni$_.JObject?>? getChapterList(
|
||||||
|
jni$_.JObject? sManga,
|
||||||
|
jni$_.JString? string,
|
||||||
|
) {
|
||||||
|
final _$sManga = sManga?.reference ?? jni$_.jNullReference;
|
||||||
|
final _$string = string?.reference ?? jni$_.jNullReference;
|
||||||
|
return _getChapterList(
|
||||||
|
reference.pointer,
|
||||||
|
_id_getChapterList as jni$_.JMethodIDPtr,
|
||||||
|
_$sManga.pointer,
|
||||||
|
_$string.pointer,
|
||||||
|
).object<jni$_.JList<jni$_.JObject?>?>(
|
||||||
|
const jni$_.JListNullableType<jni$_.JObject?>(
|
||||||
|
jni$_.JObjectNullableType(),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
static final _id_getVideoList = _class.instanceMethodId(
|
static final _id_getVideoList = _class.instanceMethodId(
|
||||||
r'getVideoList',
|
r'getVideoList',
|
||||||
r'(Leu/kanade/tachiyomi/animesource/model/SEpisode;Ljava/lang/String;)Ljava/util/List;',
|
r'(Leu/kanade/tachiyomi/animesource/model/SEpisode;Ljava/lang/String;)Ljava/util/List;',
|
||||||
@@ -362,6 +500,52 @@ class JAniyomiBridge extends jni$_.JObject {
|
|||||||
),
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static final _id_getPageList = _class.instanceMethodId(
|
||||||
|
r'getPageList',
|
||||||
|
r'(Leu/kanade/tachiyomi/source/model/SChapter;Ljava/lang/String;)Ljava/util/List;',
|
||||||
|
);
|
||||||
|
|
||||||
|
static final _getPageList =
|
||||||
|
jni$_.ProtectedJniExtensions.lookup<
|
||||||
|
jni$_.NativeFunction<
|
||||||
|
jni$_.JniResult Function(
|
||||||
|
jni$_.Pointer<jni$_.Void>,
|
||||||
|
jni$_.JMethodIDPtr,
|
||||||
|
jni$_.VarArgs<
|
||||||
|
(jni$_.Pointer<jni$_.Void>, jni$_.Pointer<jni$_.Void>)
|
||||||
|
>,
|
||||||
|
)
|
||||||
|
>
|
||||||
|
>('globalEnv_CallObjectMethod')
|
||||||
|
.asFunction<
|
||||||
|
jni$_.JniResult Function(
|
||||||
|
jni$_.Pointer<jni$_.Void>,
|
||||||
|
jni$_.JMethodIDPtr,
|
||||||
|
jni$_.Pointer<jni$_.Void>,
|
||||||
|
jni$_.Pointer<jni$_.Void>,
|
||||||
|
)
|
||||||
|
>();
|
||||||
|
|
||||||
|
/// from: `public java.util.List<eu.kanade.tachiyomi.source.model.Page> getPageList(eu.kanade.tachiyomi.source.model.SChapter sChapter, java.lang.String string)`
|
||||||
|
/// The returned object must be released after use, by calling the [release] method.
|
||||||
|
jni$_.JList<jni$_.JObject?>? getPageList(
|
||||||
|
jni$_.JObject? sChapter,
|
||||||
|
jni$_.JString? string,
|
||||||
|
) {
|
||||||
|
final _$sChapter = sChapter?.reference ?? jni$_.jNullReference;
|
||||||
|
final _$string = string?.reference ?? jni$_.jNullReference;
|
||||||
|
return _getPageList(
|
||||||
|
reference.pointer,
|
||||||
|
_id_getPageList as jni$_.JMethodIDPtr,
|
||||||
|
_$sChapter.pointer,
|
||||||
|
_$string.pointer,
|
||||||
|
).object<jni$_.JList<jni$_.JObject?>?>(
|
||||||
|
const jni$_.JListNullableType<jni$_.JObject?>(
|
||||||
|
jni$_.JObjectNullableType(),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
final class $AniyomiBridge$NullableType extends jni$_.JObjType<JAniyomiBridge?> {
|
final class $AniyomiBridge$NullableType extends jni$_.JObjType<JAniyomiBridge?> {
|
||||||
|
|||||||
1126
lib/jmodels/jpage.dart
Normal file
1126
lib/jmodels/jpage.dart
Normal file
File diff suppressed because it is too large
Load Diff
1004
lib/jmodels/jschapter.dart
Normal file
1004
lib/jmodels/jschapter.dart
Normal file
File diff suppressed because it is too large
Load Diff
1618
lib/jmodels/jsmanga.dart
Normal file
1618
lib/jmodels/jsmanga.dart
Normal file
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user