├── .assets
├── demo.mp4
└── test.txt
├── .github
└── workflows
│ └── android-release.yml
├── .gitignore
├── .metadata
├── README.md
├── analysis_options.yaml
├── android
├── .gitignore
├── app
│ ├── build.gradle
│ ├── proguard-rules.pro
│ └── src
│ │ ├── debug
│ │ └── AndroidManifest.xml
│ │ ├── main
│ │ ├── AndroidManifest.xml
│ │ ├── kotlin
│ │ │ └── com
│ │ │ │ └── example
│ │ │ │ └── ani_app
│ │ │ │ └── MainActivity.kt
│ │ └── res
│ │ │ ├── drawable-v21
│ │ │ └── launch_background.xml
│ │ │ ├── drawable
│ │ │ └── launch_background.xml
│ │ │ ├── mipmap-hdpi
│ │ │ └── ic_launcher.png
│ │ │ ├── mipmap-mdpi
│ │ │ └── ic_launcher.png
│ │ │ ├── mipmap-xhdpi
│ │ │ └── ic_launcher.png
│ │ │ ├── mipmap-xxhdpi
│ │ │ └── ic_launcher.png
│ │ │ ├── mipmap-xxxhdpi
│ │ │ └── ic_launcher.png
│ │ │ ├── values-night
│ │ │ └── styles.xml
│ │ │ └── values
│ │ │ └── styles.xml
│ │ └── profile
│ │ └── AndroidManifest.xml
├── build.gradle
├── gradle.properties
├── gradle
│ └── wrapper
│ │ └── gradle-wrapper.properties
└── settings.gradle
├── lib
├── constants.dart
├── main.dart
├── scraper.dart
├── types.dart
├── utils.dart
└── widgets.dart
├── pubspec.lock
├── pubspec.yaml
└── test
└── widget_test.dart
/.assets/demo.mp4:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mdrokz/ani_mobile/33b34ef73c2443baee4c96720e0414b5cb01cd65/.assets/demo.mp4
--------------------------------------------------------------------------------
/.assets/test.txt:
--------------------------------------------------------------------------------
1 | test
2 |
--------------------------------------------------------------------------------
/.github/workflows/android-release.yml:
--------------------------------------------------------------------------------
1 | name: Ani Mobile Android Release
2 |
3 | on:
4 | push:
5 | branches: [master]
6 |
7 | jobs:
8 | version:
9 | name: Create version number
10 | runs-on: macos-latest
11 | steps:
12 | - uses: actions/checkout@v1
13 | - name: Fetch all history for all tags and branches
14 | run: |
15 | git fetch --prune --depth=10000
16 | - name: Install GitVersion
17 | uses: gittools/actions/gitversion/setup@v0.9.6
18 | with:
19 | versionSpec: '5.x'
20 | - name: Use GitVersion
21 | id: gitversion
22 | uses: gittools/actions/gitversion/execute@v0.9.6
23 | - name: Create version.txt with nuGetVersion
24 | run: echo ${{ steps.gitversion.outputs.nuGetVersion }} > version.txt
25 | - name: Upload version.txt
26 | uses: actions/upload-artifact@v2
27 | with:
28 | name: gitversion
29 | path: version.txt
30 |
31 | build:
32 | name: Build APK and Create release
33 | needs: [ version ]
34 | runs-on: ubuntu-latest
35 | steps:
36 | - uses: actions/checkout@v1
37 | - uses: actions/setup-java@v1
38 | with:
39 | java-version: '12.x'
40 | - uses: subosito/flutter-action@v1
41 | with:
42 | flutter-version: '2.10.1'
43 | - name: Get version.txt
44 | uses: actions/download-artifact@v2
45 | with:
46 | name: gitversion
47 | - name: Read version
48 | id: version
49 | uses: juliangruber/read-file-action@v1
50 | with:
51 | path: version.txt
52 | - run: flutter pub get
53 | # - run: flutter test
54 | - run: flutter build apk --release --split-per-abi
55 | - run: flutter build appbundle
56 | - name: Create a Release in GitHub
57 | uses: ncipollo/release-action@v1
58 | with:
59 | artifacts: "build/app/outputs/apk/release/*.apk,build/app/outputs/bundle/release/app-release.aab"
60 | token: ${{ secrets.GH_TOKEN }}
61 | tag: ${{ steps.version.outputs.content }}
62 | commit: ${{ github.sha }}
63 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | # Miscellaneous
2 | *.class
3 | *.log
4 | *.pyc
5 | *.swp
6 | .DS_Store
7 | .atom/
8 | .buildlog/
9 | .history
10 | .svn/
11 |
12 | # IntelliJ related
13 | *.iml
14 | *.ipr
15 | *.iws
16 | .idea/
17 |
18 | # The .vscode folder contains launch configuration and tasks you configure in
19 | # VS Code which you may wish to be included in version control, so this line
20 | # is commented out by default.
21 | #.vscode/
22 |
23 | # Flutter/Dart/Pub related
24 | **/doc/api/
25 | **/ios/Flutter/.last_build_id
26 | .dart_tool/
27 | .flutter-plugins
28 | .flutter-plugins-dependencies
29 | .packages
30 | .pub-cache/
31 | .pub/
32 | /build/
33 |
34 | # Web related
35 | lib/generated_plugin_registrant.dart
36 |
37 | # Symbolication related
38 | app.*.symbols
39 |
40 | # Obfuscation related
41 | app.*.map.json
42 |
43 | # Android Studio will place build artifacts here
44 | /android/app/debug
45 | /android/app/profile
46 | /android/app/release
47 |
--------------------------------------------------------------------------------
/.metadata:
--------------------------------------------------------------------------------
1 | # This file tracks properties of this Flutter project.
2 | # Used by Flutter tool to assess capabilities and perform upgrades etc.
3 | #
4 | # This file should be version controlled and should not be manually edited.
5 |
6 | version:
7 | revision: 7e9793dee1b85a243edd0e06cb1658e98b077561
8 | channel: stable
9 |
10 | project_type: app
11 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # ani_app
2 |
3 | Based on the CLI tool for watching anime [ani-cli](https://github.com/pystardust/ani-cli)
4 |
5 |
6 | Showcase
7 |
8 |
9 |
10 |
12 |
13 | # Installation
14 |
15 | Check the [releases](https://github.com/mdrokz/ani_mobile/releases) page for latest APK
16 |
--------------------------------------------------------------------------------
/analysis_options.yaml:
--------------------------------------------------------------------------------
1 | # This file configures the analyzer, which statically analyzes Dart code to
2 | # check for errors, warnings, and lints.
3 | #
4 | # The issues identified by the analyzer are surfaced in the UI of Dart-enabled
5 | # IDEs (https://dart.dev/tools#ides-and-editors). The analyzer can also be
6 | # invoked from the command line by running `flutter analyze`.
7 |
8 | # The following line activates a set of recommended lints for Flutter apps,
9 | # packages, and plugins designed to encourage good coding practices.
10 | include: package:flutter_lints/flutter.yaml
11 |
12 | linter:
13 | # The lint rules applied to this project can be customized in the
14 | # section below to disable rules from the `package:flutter_lints/flutter.yaml`
15 | # included above or to enable additional rules. A list of all available lints
16 | # and their documentation is published at
17 | # https://dart-lang.github.io/linter/lints/index.html.
18 | #
19 | # Instead of disabling a lint rule for the entire project in the
20 | # section below, it can also be suppressed for a single line of code
21 | # or a specific dart file by using the `// ignore: name_of_lint` and
22 | # `// ignore_for_file: name_of_lint` syntax on the line or in the file
23 | # producing the lint.
24 | rules:
25 | # avoid_print: false # Uncomment to disable the `avoid_print` rule
26 | # prefer_single_quotes: true # Uncomment to enable the `prefer_single_quotes` rule
27 |
28 | # Additional information about this file can be found at
29 | # https://dart.dev/guides/language/analysis-options
30 |
--------------------------------------------------------------------------------
/android/.gitignore:
--------------------------------------------------------------------------------
1 | gradle-wrapper.jar
2 | /.gradle
3 | /captures/
4 | /gradlew
5 | /gradlew.bat
6 | /local.properties
7 | GeneratedPluginRegistrant.java
8 |
9 | # Remember to never publicly share your keystore.
10 | # See https://flutter.dev/docs/deployment/android#reference-the-keystore-from-the-app
11 | key.properties
12 | **/*.keystore
13 | **/*.jks
14 |
--------------------------------------------------------------------------------
/android/app/build.gradle:
--------------------------------------------------------------------------------
1 | def localProperties = new Properties()
2 | def localPropertiesFile = rootProject.file('local.properties')
3 | if (localPropertiesFile.exists()) {
4 | localPropertiesFile.withReader('UTF-8') { reader ->
5 | localProperties.load(reader)
6 | }
7 | }
8 |
9 | def flutterRoot = localProperties.getProperty('flutter.sdk')
10 | if (flutterRoot == null) {
11 | throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.")
12 | }
13 |
14 | def flutterVersionCode = localProperties.getProperty('flutter.versionCode')
15 | if (flutterVersionCode == null) {
16 | flutterVersionCode = '1'
17 | }
18 |
19 | def flutterVersionName = localProperties.getProperty('flutter.versionName')
20 | if (flutterVersionName == null) {
21 | flutterVersionName = '1.0'
22 | }
23 |
24 | apply plugin: 'com.android.application'
25 | apply plugin: 'kotlin-android'
26 | apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
27 |
28 | android {
29 | compileSdkVersion flutter.compileSdkVersion
30 |
31 | packagingOptions {
32 | // Fixes duplicate libraries build issue,
33 | // when your project uses more than one plugin that depend on C++ libs.
34 | pickFirst 'lib/**/libc++_shared.so'
35 | }
36 |
37 | compileOptions {
38 | sourceCompatibility JavaVersion.VERSION_1_8
39 | targetCompatibility JavaVersion.VERSION_1_8
40 | }
41 |
42 | kotlinOptions {
43 | jvmTarget = '1.8'
44 | }
45 |
46 | sourceSets {
47 | main.java.srcDirs += 'src/main/kotlin'
48 | }
49 |
50 | defaultConfig {
51 | // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
52 | applicationId "com.example.ani_app"
53 | minSdkVersion 20
54 | targetSdkVersion flutter.targetSdkVersion
55 | versionCode flutterVersionCode.toInteger()
56 | versionName flutterVersionName
57 | }
58 |
59 | buildTypes {
60 | release {
61 | // TODO: Add your own signing config for the release build.
62 | // Signing with the debug keys for now, so `flutter run --release` works.
63 | useProguard true
64 | proguardFiles getDefaultProguardFile(
65 | 'proguard-android-optimize.txt'),
66 | 'proguard-rules.pro'
67 | signingConfig signingConfigs.debug
68 | }
69 | }
70 | }
71 |
72 | flutter {
73 | source '../..'
74 | }
75 |
76 | dependencies {
77 | implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
78 | }
79 |
--------------------------------------------------------------------------------
/android/app/proguard-rules.pro:
--------------------------------------------------------------------------------
1 | -keep class org.videolan.libvlc.** { *; }
--------------------------------------------------------------------------------
/android/app/src/debug/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
3 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/android/app/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
14 |
22 |
26 |
30 |
31 |
32 |
33 |
34 |
35 |
37 |
40 |
41 |
42 |
--------------------------------------------------------------------------------
/android/app/src/main/kotlin/com/example/ani_app/MainActivity.kt:
--------------------------------------------------------------------------------
1 | package com.example.ani_app
2 |
3 | import io.flutter.embedding.android.FlutterActivity
4 |
5 | class MainActivity: FlutterActivity() {
6 | }
7 |
--------------------------------------------------------------------------------
/android/app/src/main/res/drawable-v21/launch_background.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
12 |
13 |
--------------------------------------------------------------------------------
/android/app/src/main/res/drawable/launch_background.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
12 |
13 |
--------------------------------------------------------------------------------
/android/app/src/main/res/mipmap-hdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mdrokz/ani_mobile/33b34ef73c2443baee4c96720e0414b5cb01cd65/android/app/src/main/res/mipmap-hdpi/ic_launcher.png
--------------------------------------------------------------------------------
/android/app/src/main/res/mipmap-mdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mdrokz/ani_mobile/33b34ef73c2443baee4c96720e0414b5cb01cd65/android/app/src/main/res/mipmap-mdpi/ic_launcher.png
--------------------------------------------------------------------------------
/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mdrokz/ani_mobile/33b34ef73c2443baee4c96720e0414b5cb01cd65/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mdrokz/ani_mobile/33b34ef73c2443baee4c96720e0414b5cb01cd65/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mdrokz/ani_mobile/33b34ef73c2443baee4c96720e0414b5cb01cd65/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/android/app/src/main/res/values-night/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
9 |
15 |
18 |
19 |
--------------------------------------------------------------------------------
/android/app/src/main/res/values/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
9 |
15 |
18 |
19 |
--------------------------------------------------------------------------------
/android/app/src/profile/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
3 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/android/build.gradle:
--------------------------------------------------------------------------------
1 | buildscript {
2 | ext.kotlin_version = '1.6.10'
3 | repositories {
4 | google()
5 | mavenCentral()
6 | }
7 |
8 | dependencies {
9 | classpath 'com.android.tools.build:gradle:4.1.0'
10 | classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
11 | }
12 | }
13 |
14 | allprojects {
15 | repositories {
16 | google()
17 | mavenCentral()
18 | }
19 | }
20 |
21 | rootProject.buildDir = '../build'
22 | subprojects {
23 | project.buildDir = "${rootProject.buildDir}/${project.name}"
24 | }
25 | subprojects {
26 | project.evaluationDependsOn(':app')
27 | }
28 |
29 | task clean(type: Delete) {
30 | delete rootProject.buildDir
31 | }
32 |
--------------------------------------------------------------------------------
/android/gradle.properties:
--------------------------------------------------------------------------------
1 | org.gradle.jvmargs=-Xmx1536M
2 | android.useAndroidX=true
3 | android.enableJetifier=true
4 |
--------------------------------------------------------------------------------
/android/gradle/wrapper/gradle-wrapper.properties:
--------------------------------------------------------------------------------
1 | #Fri Jun 23 08:50:38 CEST 2017
2 | distributionBase=GRADLE_USER_HOME
3 | distributionPath=wrapper/dists
4 | zipStoreBase=GRADLE_USER_HOME
5 | zipStorePath=wrapper/dists
6 | distributionUrl=https\://services.gradle.org/distributions/gradle-6.7-all.zip
7 |
--------------------------------------------------------------------------------
/android/settings.gradle:
--------------------------------------------------------------------------------
1 | include ':app'
2 |
3 | def localPropertiesFile = new File(rootProject.projectDir, "local.properties")
4 | def properties = new Properties()
5 |
6 | assert localPropertiesFile.exists()
7 | localPropertiesFile.withReader("UTF-8") { reader -> properties.load(reader) }
8 |
9 | def flutterSdkPath = properties.getProperty("flutter.sdk")
10 | assert flutterSdkPath != null, "flutter.sdk not set in local.properties"
11 | apply from: "$flutterSdkPath/packages/flutter_tools/gradle/app_plugin_loader.gradle"
12 |
--------------------------------------------------------------------------------
/lib/constants.dart:
--------------------------------------------------------------------------------
1 | library ani_app.globals;
2 |
3 |
4 | // HTTP
5 | String baseUrl = "https://goload.pro";
6 | String decryptionUrl = "https://goload.pro/encrypt-ajax.php";
7 | String userAgent = "Mozilla/5.0 (X11; Ubuntu; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/55.0.2919.83 Safari/537.36";
8 |
9 |
10 | // HTML selectors
11 | String secondKeyPath = "div[class*='videocontent-']";
12 | String keyPath = "body[class^='container-']";
13 | String ivPath = "div[class*='container-']";
14 | String newSecretValuePath = "body[class*='container-']";
15 | String secretValuePath = 'script[data-name="episode"]';
16 |
17 | List settings = [
18 | "",
19 | "History",
20 | "Favourites"
21 | ];
--------------------------------------------------------------------------------
/lib/main.dart:
--------------------------------------------------------------------------------
1 | import 'dart:async';
2 | import 'dart:developer';
3 |
4 | import 'package:flutter/material.dart';
5 | import 'package:flutter/services.dart';
6 | import 'package:flutter_vlc_player/flutter_vlc_player.dart';
7 | import 'package:chewie/chewie.dart';
8 |
9 | import 'scraper.dart' as scraper;
10 |
11 | import 'widgets.dart';
12 |
13 | void main() {
14 | runApp(const MyApp());
15 | }
16 |
17 | class MyApp extends StatelessWidget {
18 | const MyApp({Key? key}) : super(key: key);
19 |
20 | // This widget is the root of your application.
21 | @override
22 | Widget build(BuildContext context) {
23 | return MaterialApp(
24 | title: 'Ani Mobile',
25 | theme: ThemeData(
26 | // This is the theme of your application.
27 | //
28 | // Try running your application with "flutter run". You'll see the
29 | // application has a blue toolbar. Then, without quitting the app, try
30 | // changing the primarySwatch below to Colors.green and then invoke
31 | // "hot reload" (press "r" in the console where you ran "flutter run",
32 | // or simply save your changes to "hot reload" in a Flutter IDE).
33 | // Notice that the counter didn't reset back to zero; the application
34 | // is not restarted.
35 | primarySwatch: Colors.blue,
36 | ),
37 | home: const MyHomePage(title: 'Ani Mobile'),
38 | );
39 | }
40 | }
41 |
42 | class Episode extends StatefulWidget {
43 | const Episode({Key? key, required this.streamLink}) : super(key: key);
44 |
45 | final String streamLink;
46 |
47 | @override
48 | State createState() => EpisodePage();
49 | }
50 |
51 | class EpisodePage extends State {
52 | late VlcPlayerController videoPlayerController;
53 | late ChewieController chewieController;
54 |
55 | @override
56 | void initState() {
57 | setState(() {
58 | videoPlayerController = VlcPlayerController.network(
59 | widget.streamLink,
60 | hwAcc: HwAcc.full,
61 | autoPlay: true,
62 | autoInitialize: true,
63 | options: VlcPlayerOptions(),
64 | );
65 | chewieController = ChewieController(
66 | videoPlayerController: videoPlayerController,
67 | autoPlay: false,
68 | allowFullScreen: false,
69 | fullScreenByDefault: false,
70 | autoInitialize: false,
71 | );
72 | });
73 | SystemChrome.setEnabledSystemUIMode(SystemUiMode.manual, overlays: []);
74 | SystemChrome.setPreferredOrientations([
75 | DeviceOrientation.landscapeLeft,
76 | DeviceOrientation.landscapeRight,
77 | ]);
78 |
79 | super.initState();
80 | }
81 |
82 | void disposeVideoController() async {
83 | await videoPlayerController.stopRendererScanning();
84 | await videoPlayerController.dispose();
85 | chewieController.dispose();
86 | }
87 |
88 | @override
89 | void deactivate() {
90 | SystemChrome.setPreferredOrientations([
91 | DeviceOrientation.portraitDown,
92 | DeviceOrientation.portraitUp,
93 | ]);
94 | disposeVideoController();
95 | super.deactivate();
96 | }
97 |
98 | @override
99 | Widget build(BuildContext context) {
100 | return Scaffold(
101 | body: Stack(
102 | children: [
103 | Chewie(
104 | controller: chewieController,
105 | )
106 | ],
107 | ));
108 | }
109 | }
110 |
111 | class MyHomePage extends StatefulWidget {
112 | const MyHomePage({Key? key, required this.title}) : super(key: key);
113 |
114 | // This widget is the home page of your application. It is stateful, meaning
115 | // that it has a State object (defined below) that contains fields that affect
116 | // how it looks.
117 |
118 | // This class is the configuration for the state. It holds the values (in this
119 | // case the title) provided by the parent (in this case the App widget) and
120 | // used by the build method of the State. Fields in a Widget subclass are
121 | // always marked "final".
122 |
123 | final String title;
124 |
125 | @override
126 | State createState() => _MyHomePageState();
127 | }
128 |
129 | class _MyHomePageState extends State {
130 | final _controller = TextEditingController();
131 | Timer? _debounce;
132 | bool isSearching = false;
133 | List