Merge pull request #429 from tzugen/428

Fix #428
This commit is contained in:
Nite 2021-04-22 08:33:12 +02:00 committed by GitHub
commit 2e4dde099d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 1 deletions

View File

@ -1375,7 +1375,8 @@ public class PlayerFragment extends Fragment implements GestureDetector.OnGestur
switch (playerState) switch (playerState)
{ {
case DOWNLOADING: case DOWNLOADING:
String downloadStatus = getResources().getString(R.string.download_playerstate_downloading, Util.formatPercentage(currentPlaying.getProgress().getValue())); int progress = currentPlaying != null ? currentPlaying.getProgress().getValue() : 0;
String downloadStatus = getResources().getString(R.string.download_playerstate_downloading, Util.formatPercentage(progress));
FragmentTitle.Companion.setTitle(PlayerFragment.this, downloadStatus); FragmentTitle.Companion.setTitle(PlayerFragment.this, downloadStatus);
break; break;
case PREPARING: case PREPARING: