0.5.7 - Sleep timer

This commit is contained in:
exttex 2020-10-15 22:10:17 +02:00
parent 2ad4c169b8
commit 396b51e90f
7 changed files with 158 additions and 32 deletions

View file

@ -1,3 +1,5 @@
import 'dart:async';
import 'package:freezer/api/deezer.dart';
import 'package:freezer/api/definitions.dart';
import 'package:freezer/ui/details_screens.dart';
@ -41,6 +43,12 @@ class Cache {
@JsonKey(defaultValue: SortType.DEFAULT)
SortType trackSort;
//Sleep timer
@JsonKey(ignore: true)
DateTime sleepTimerTime;
@JsonKey(ignore: true)
StreamSubscription sleepTimer;
//If download threads warning was shown
@JsonKey(defaultValue: false)
bool threadsWarning;

View file

@ -336,6 +336,7 @@ class AudioPlayerTask extends BackgroundAudioTask {
//Restore position on play
if (_lastPosition != null) {
onSeekTo(_lastPosition);
_lastPosition = null;
}
}