mirror of
https://github.com/Dr-Blank/Vaani.git
synced 2025-12-07 11:39:29 +00:00
feat: new settings to configure when to report playback and when to mark item complete (#32)
This commit is contained in:
parent
7279fa0bd6
commit
8049a660e6
6 changed files with 129 additions and 7 deletions
|
|
@ -73,10 +73,19 @@ _$PlayerSettingsImpl _$$PlayerSettingsImplFromJson(Map<String, dynamic> json) =>
|
|||
? const SleepTimerSettings()
|
||||
: SleepTimerSettings.fromJson(
|
||||
json['sleepTimerSettings'] as Map<String, dynamic>),
|
||||
minimumPositionForReporting: json['minimumPositionForReporting'] == null
|
||||
? const Duration(seconds: 10)
|
||||
: Duration(
|
||||
microseconds:
|
||||
(json['minimumPositionForReporting'] as num).toInt()),
|
||||
playbackReportInterval: json['playbackReportInterval'] == null
|
||||
? const Duration(seconds: 10)
|
||||
: Duration(
|
||||
microseconds: (json['playbackReportInterval'] as num).toInt()),
|
||||
markCompleteWhenTimeLeft: json['markCompleteWhenTimeLeft'] == null
|
||||
? const Duration(seconds: 15)
|
||||
: Duration(
|
||||
microseconds: (json['markCompleteWhenTimeLeft'] as num).toInt()),
|
||||
configurePlayerForEveryBook:
|
||||
json['configurePlayerForEveryBook'] as bool? ?? true,
|
||||
);
|
||||
|
|
@ -90,7 +99,11 @@ Map<String, dynamic> _$$PlayerSettingsImplToJson(
|
|||
'preferredDefaultSpeed': instance.preferredDefaultSpeed,
|
||||
'speedOptions': instance.speedOptions,
|
||||
'sleepTimerSettings': instance.sleepTimerSettings,
|
||||
'minimumPositionForReporting':
|
||||
instance.minimumPositionForReporting.inMicroseconds,
|
||||
'playbackReportInterval': instance.playbackReportInterval.inMicroseconds,
|
||||
'markCompleteWhenTimeLeft':
|
||||
instance.markCompleteWhenTimeLeft.inMicroseconds,
|
||||
'configurePlayerForEveryBook': instance.configurePlayerForEveryBook,
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue