Fix incorrect progress string on widget
If option "pref_followQueue_title" is disabled, when played episode #1 is ended and next episode #2 is loaded, progress string on widget show incorrect information about position and duration of episode, because it show (position / duration) of ended episode #1 instead of (position / duration) of loaded episode #2.
This commit is contained in:
parent
3b51af00e3
commit
917e60fbe2
|
@ -219,7 +219,7 @@ public class PlayerWidgetJobService extends SafeJobIntentService {
|
||||||
}
|
}
|
||||||
|
|
||||||
private String getProgressString(int position, int duration, float speed) {
|
private String getProgressString(int position, int duration, float speed) {
|
||||||
if (position > 0 && duration > 0) {
|
if (position >= 0 && duration > 0) {
|
||||||
TimeSpeedConverter converter = new TimeSpeedConverter(speed);
|
TimeSpeedConverter converter = new TimeSpeedConverter(speed);
|
||||||
position = converter.convert(position);
|
position = converter.convert(position);
|
||||||
duration = converter.convert(duration);
|
duration = converter.convert(duration);
|
||||||
|
|
Loading…
Reference in New Issue