Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
kodjodevf committed Aug 21, 2024
1 parent 9530d11 commit 8cb04cc
Show file tree
Hide file tree
Showing 7 changed files with 8 additions and 7 deletions.
2 changes: 1 addition & 1 deletion lib/modules/more/about/providers/check_for_update.dart
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ Future<void> _launchInBrowser(Uri url) async {
}

Future<(String, String, String)> _checkUpdate() async {
final http = MClient.init();
final http = MClient.init(reqcopyWith: {'useDartHttpClient': true});
try {
final res = await http.get(Uri.parse(
"https://api.github.com/repos/kodjodevf/Mangayomi/releases?page=1&per_page=10"));
Expand Down
2 changes: 1 addition & 1 deletion lib/services/aniskip.dart
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ part 'aniskip.g.dart';
// credits: https://github.com/aniyomiorg/aniyomi/blob/master/app/src/main/java/eu/kanade/tachiyomi/util/AniSkipApi.kt
@riverpod
class AniSkip extends _$AniSkip {
final http = MClient.init();
final http = MClient.init(reqcopyWith: {'useDartHttpClient': true});
@override
void build() {}

Expand Down
2 changes: 1 addition & 1 deletion lib/services/fetch_sources_list.dart
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ Future<void> fetchSourcesList(
required String sourcesIndexUrl,
required AutoDisposeRef ref,
required bool isManga}) async {
final http = MClient.init();
final http = MClient.init(reqcopyWith: {'useDartHttpClient': true});
final req = await http.get(Uri.parse(sourcesIndexUrl));

final sourceList =
Expand Down
3 changes: 2 additions & 1 deletion lib/services/torrent_server.dart
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import 'package:mangayomi/providers/storage_provider.dart';
import 'package:mangayomi/services/http/m_client.dart';
import 'package:mangayomi/utils/extensions/string_extensions.dart';
import 'package:mangayomi/ffi/torrent_server_ffi.dart' as libmtorrentserver_ffi;

class MTorrentServer {
final http = MClient.init();
Future<bool> removeTorrent(String? inforHash) async {
Expand Down Expand Up @@ -49,7 +50,7 @@ class MTorrentServer {

request.files.add(MultipartFile.fromBytes('file', torrentByte,
filename: 'file.torrent'));
StreamedResponse response = await request.send();
final response = await http.send(request);
return await response.stream.bytesToString();
} catch (e) {
rethrow;
Expand Down
2 changes: 1 addition & 1 deletion lib/services/trackers/anilist.dart
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ part 'anilist.g.dart';

@riverpod
class Anilist extends _$Anilist {
final http = MClient.init();
final http = MClient.init(reqcopyWith: {'useDartHttpClient': true});
final String _clientId =
(Platform.isWindows || Platform.isLinux) ? '13587' : '13588';
static const String _baseApiUrl = "https://graphql.anilist.co/";
Expand Down
2 changes: 1 addition & 1 deletion lib/services/trackers/kitsu.dart
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ part 'kitsu.g.dart';

@riverpod
class Kitsu extends _$Kitsu {
final http = MClient.init();
final http = MClient.init(reqcopyWith: {'useDartHttpClient': true});
final String _clientId =
'dd031b32d2f56c990b1425efe6c42ad847e7fe3ab46bf1299f05ecd856bdb7dd';
final String _clientSecret =
Expand Down
2 changes: 1 addition & 1 deletion lib/services/trackers/myanimelist.dart
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ part 'myanimelist.g.dart';

@riverpod
class MyAnimeList extends _$MyAnimeList {
final http = MClient.init();
final http = MClient.init(reqcopyWith: {'useDartHttpClient': true});
String baseOAuthUrl = 'https://myanimelist.net/v1/oauth2';
String baseApiUrl = 'https://api.myanimelist.net/v2';
String codeVerifier = "";
Expand Down

0 comments on commit 8cb04cc

Please sign in to comment.