Closed costaalex closed 3 years ago
Hello Alex Currently I am occupied with my exams and college. I will look into the issue as soon as they are over :)
Great. I'm new into Flutter but I'll try to look into it too :))
So, it is keeping the bookmarks after reinstalling, but the problem is that if I quit the app at a certain minute, (for example 6), the next time I open the audiobook, it replays aproximately at a double position (12) compared to the last session.
I found the problem. In the updateSharedPrefs()
function (components/player.dart), the position.inSeconds
returns the number of seconds from the beginning of the audio. For minute 2, second 2, position.inSeconds
will be 112. So it adds to the position 2 times the same thing.
In the function updateSharedPrefs()
, replace:
position.inSeconds,
with
(position.inSeconds - (position.inMinutes * 60)).toString(),
The same logic applies to minutes:
(position.inMinutes - position.inHours * 60).toString(),
The bookmark feature doesn't seem to be working.