mirror of
https://github.com/advplyr/audiobookshelf-app.git
synced 2026-08-06 20:08:48 +02:00
Match rewind times to android
This commit is contained in:
@@ -29,21 +29,13 @@ class PlayerTimeUtils {
|
||||
return 0
|
||||
}
|
||||
if let sinceLastPlayed = sinceLastPlayed {
|
||||
if sinceLastPlayed < 6 {
|
||||
return 2
|
||||
} else if sinceLastPlayed < 12 {
|
||||
return 10
|
||||
} else if sinceLastPlayed < 30 {
|
||||
return 15
|
||||
} else if sinceLastPlayed < 180 {
|
||||
return 20
|
||||
} else if sinceLastPlayed < 3600 {
|
||||
return 25
|
||||
} else {
|
||||
return 29
|
||||
}
|
||||
if sinceLastPlayed < 10 { return 0 } // 10s or less = no seekback
|
||||
else if sinceLastPlayed < 60 { return 3 } // 10s to 1m = jump back 3s
|
||||
else if sinceLastPlayed < 300 { return 10 } // 1m to 5m = jump back 10s
|
||||
else if sinceLastPlayed < 1800 { return 20 } // 5m to 30m = jump back 20s
|
||||
else { return 30 } // 30m and up = jump back 30s
|
||||
} else {
|
||||
return 5
|
||||
return 0
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user