aboutsummaryrefslogtreecommitdiff
path: root/app/src/main/java
diff options
context:
space:
mode:
authorScott Jackson <daneren2005@gmail.com>2015-07-18 19:21:49 -0700
committerScott Jackson <daneren2005@gmail.com>2015-07-18 19:21:49 -0700
commit67ed55d9c0b4e92ef962d39ef9f20326c11beaa1 (patch)
tree4404dd1ad89fdb1cfddb57f470080aa9baf0496f /app/src/main/java
parent75dccf25a5efb9915ff5ae70818d99eeda3db1ae (diff)
downloaddsub-67ed55d9c0b4e92ef962d39ef9f20326c11beaa1.tar.gz
dsub-67ed55d9c0b4e92ef962d39ef9f20326c11beaa1.tar.bz2
dsub-67ed55d9c0b4e92ef962d39ef9f20326c11beaa1.zip
Fix -1/0
Diffstat (limited to 'app/src/main/java')
-rw-r--r--app/src/main/java/github/daneren2005/dsub/fragments/NowPlayingFragment.java4
1 files changed, 2 insertions, 2 deletions
diff --git a/app/src/main/java/github/daneren2005/dsub/fragments/NowPlayingFragment.java b/app/src/main/java/github/daneren2005/dsub/fragments/NowPlayingFragment.java
index bf8c28df..9fa377da 100644
--- a/app/src/main/java/github/daneren2005/dsub/fragments/NowPlayingFragment.java
+++ b/app/src/main/java/github/daneren2005/dsub/fragments/NowPlayingFragment.java
@@ -1253,7 +1253,7 @@ public class NowPlayingFragment extends SubsonicFragment implements OnGestureLis
songTitleTextView.setText(song.getTitle());
getImageLoader().loadImage(albumArtImageView, song, true, true);
starButton.setImageResource(song.isStarred() ? android.R.drawable.btn_star_big_on : android.R.drawable.btn_star_big_off);
- setSubtitle(context.getResources().getString(R.string.download_playing_out_of, currentPlayingIndex + 1, currentPlayingSize));
+ setSubtitle(context.getResources().getString(R.string.download_playing_out_of, Math.max(0, currentPlayingIndex + 1), currentPlayingSize));
int badRating, goodRating, bookmark;
if(song.getRating() == 1) {
@@ -1338,7 +1338,7 @@ public class NowPlayingFragment extends SubsonicFragment implements OnGestureLis
scrollWhenLoaded = false;
}
- setSubtitle(context.getResources().getString(R.string.download_playing_out_of, currentPlayingIndex, currentPlayingSize));
+ setSubtitle(context.getResources().getString(R.string.download_playing_out_of, currentPlayingIndex + 1, currentPlayingSize));
if(this.currentPlaying != currentPlaying) {
onSongChanged(currentPlaying, currentPlayingIndex);
}