accept clearText

This commit is contained in:
kodjomoustapha 2024-03-19 18:12:24 +01:00
parent 123c05f393
commit 30fcff68be
4 changed files with 14 additions and 4 deletions

View file

@ -7,7 +7,8 @@
<application
android:label="Mangayomi"
android:name="${applicationName}"
android:icon="@mipmap/launcher_icon">
android:icon="@mipmap/launcher_icon"
android:usesCleartextTraffic="true">
<activity
android:name=".MainActivity"
android:exported="true"

View file

@ -2,6 +2,11 @@
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>NSAppTransportSecurity</key>
<dict>
<key>NSAllowsArbitraryLoads</key>
<true/>
</dict>
<key>CADisableMinimumFrameDurationOnPhone</key>
<true/>
<key>CFBundleDevelopmentRegion</key>

View file

@ -14,7 +14,7 @@ import 'package:riverpod_annotation/riverpod_annotation.dart';
part 'torrent_server.g.dart';
class MTorrentServer {
final http = Client();
final http = MClient.init();
Future<bool> removeTorrent(String? inforHash) async {
if (inforHash == null || inforHash.isEmpty) return false;
try {
@ -44,8 +44,7 @@ class MTorrentServer {
Future<String> getInfohash(String url) async {
try {
final torrentByte =
(await MClient.init().get(Uri.parse(url))).bodyBytes;
final torrentByte = (await http.get(Uri.parse(url))).bodyBytes;
var request =
MultipartRequest('POST', Uri.parse('$_baseUrl/torrent/add'));

View file

@ -2,6 +2,11 @@
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>NSAppTransportSecurity</key>
<dict>
<key>NSAllowsArbitraryLoads</key>
<true/>
</dict>
<key>CFBundleDevelopmentRegion</key>
<string>$(DEVELOPMENT_LANGUAGE)</string>
<key>CFBundleExecutable</key>