mirror of
https://github.com/Dr-Blank/Vaani.git
synced 2025-12-06 02:59:28 +00:00
downloads and offline playback
This commit is contained in:
parent
1c95d1e4bb
commit
c24541f1cd
38 changed files with 1590 additions and 109 deletions
|
|
@ -12,8 +12,9 @@ part 'app_settings.g.dart';
|
|||
class AppSettings with _$AppSettings {
|
||||
const factory AppSettings({
|
||||
@Default(true) bool isDarkMode,
|
||||
@Default(false) bool useMaterialThemeOnItemPage,
|
||||
@Default(true) bool useMaterialThemeOnItemPage,
|
||||
@Default(PlayerSettings()) PlayerSettings playerSettings,
|
||||
@Default(DownloadSettings()) DownloadSettings downloadSettings,
|
||||
}) = _AppSettings;
|
||||
|
||||
factory AppSettings.fromJson(Map<String, dynamic> json) =>
|
||||
|
|
@ -105,3 +106,18 @@ class SleepTimerSettings with _$SleepTimerSettings {
|
|||
factory SleepTimerSettings.fromJson(Map<String, dynamic> json) =>
|
||||
_$SleepTimerSettingsFromJson(json);
|
||||
}
|
||||
|
||||
@freezed
|
||||
class DownloadSettings with _$DownloadSettings {
|
||||
const factory DownloadSettings({
|
||||
@Default(true) bool requiresWiFi,
|
||||
@Default(3) int retries,
|
||||
@Default(true) bool allowPause,
|
||||
@Default(3) int maxConcurrent,
|
||||
@Default(3) int maxConcurrentByHost,
|
||||
@Default(3) int maxConcurrentByGroup,
|
||||
}) = _DownloadSettings;
|
||||
|
||||
factory DownloadSettings.fromJson(Map<String, dynamic> json) =>
|
||||
_$DownloadSettingsFromJson(json);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue