Skip to content
Snippets Groups Projects
Commit 997c46c4 authored by Geoffrey Métais's avatar Geoffrey Métais
Browse files

Set media seen if remaining time is less than 10s

parent 185ac1f2
No related branches found
No related tags found
No related merge requests found
......@@ -705,8 +705,9 @@ public class PlaybackService extends MediaBrowserServiceCompat implements IVLCVo
if (canSwitchToVideo || media.isPodcast()) {
//Save progress
final long time = getTime();
float progress = time / (float)media.getLength();
if (progress > 0.95f) {
final long length = media.getLength();
float progress = time / (float)length;
if (progress > 0.95f || (length-time) < 10000) {
//increase seen counter if more than 95% of the media have been seen
//and reset progress to 0
final long incSeen = media.getSeen() + 1L;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment