Skip to content

commit 36a2273

abduznik edited this page May 23, 2026 · 1 revision

fix(download): optimize headers and fix analysis warnings

Commit: 36a22734bc3aa72378c13febe5bbd9d75b2c8f30

Author: abduznik

Date: 2026-04-28

Why: Fixes a bug or regression in the existing codebase.

Files Changed

lib/core/storage/file_sanity_service.dart | 2 --
 lib/providers/download_provider.dart      | 1 +
 2 files changed, 1 insertion(+), 2 deletions(-)
  • lib/core/storage/file_sanity_service.dart
  • lib/providers/download_provider.dart

Diff

diff --git a/lib/core/storage/file_sanity_service.dart b/lib/core/storage/file_sanity_service.dart
index 6b7efd6..3fad34f 100644
--- a/lib/core/storage/file_sanity_service.dart
+++ b/lib/core/storage/file_sanity_service.dart
@@ -2,7 +2,6 @@ import 'dart:async';
 import 'dart:io' as io;
 import 'package:flutter/foundation.dart';
 import 'package:flutter_riverpod/flutter_riverpod.dart';
-import 'package:freegosy/core/storage/directory_service.dart';
 import 'package:freegosy/core/storage/rom_mapping_service.dart';
 import 'package:freegosy/core/storage/download_cache_service.dart';
 import 'package:freegosy/providers/romm_provider.dart';
@@ -50,7 +49,6 @@ class FileSanityService {
 }
 
 final fileSanityServiceProvider = Provider<FileSanityService?>((ref) {
-  final dirService = ref.watch(directoryServiceProvider).asData?.value;
   final mappingServiceAsync = ref.watch(romMappingServiceProvider);
   final cacheService = ref.watch(downloadCacheServiceProvider);
 
diff --git a/lib/providers/download_provider.dart b/lib/providers/download_provider.dart
index 9e01f0c..ab7e453 100644
--- a/lib/providers/download_provider.dart
+++ b/lib/providers/download_provider.dart
@@ -23,6 +23,7 @@ final downloadServiceProvider = FutureProvider<DownloadService?>((ref) async {
     receiveTimeout: const Duration(hours: 4), // Allow up to 4 hours for large ROMs
     headers: {
       'User-Agent': 'Freegosy/${AppConstants.version}',
+      'Accept-Encoding': 'gzip, deflate, br',
     },
   ));
 

Clone this wiki locally