aboutsummaryrefslogtreecommitdiff
path: root/app/src/main/java/github
diff options
context:
space:
mode:
Diffstat (limited to 'app/src/main/java/github')
-rw-r--r--app/src/main/java/github/daneren2005/dsub/fragments/NowPlayingFragment.java17
-rw-r--r--app/src/main/java/github/daneren2005/dsub/service/DownloadService.java3
2 files changed, 18 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 d77f476f..f18b22a0 100644
--- a/app/src/main/java/github/daneren2005/dsub/fragments/NowPlayingFragment.java
+++ b/app/src/main/java/github/daneren2005/dsub/fragments/NowPlayingFragment.java
@@ -1158,11 +1158,23 @@ public class NowPlayingFragment extends SubsonicFragment implements OnGestureLis
@Override
public void onSongChanged(DownloadFile currentPlaying, int currentPlayingIndex) {
this.currentPlaying = currentPlaying;
+ setupSubtitle(currentPlayingIndex);
+ }
+
+ private void setupSubtitle(int currentPlayingIndex) {
if (currentPlaying != null) {
Entry song = currentPlaying.getSong();
songTitleTextView.setText(song.getTitle());
getImageLoader().loadImage(albumArtImageView, song, true, true);
- setSubtitle(context.getResources().getString(R.string.download_playing_out_of, currentPlayingIndex + 1, currentPlayingSize));
+
+ DownloadService downloadService = getDownloadService();
+ if(downloadService.isShufflePlayEnabled()) {
+ setSubtitle(context.getResources().getString(R.string.download_playerstate_playing_shuffle));
+ } else if(downloadService.isArtistRadio()) {
+ setSubtitle(context.getResources().getString(R.string.download_playerstate_playing_artist_radio));
+ } else {
+ setSubtitle(context.getResources().getString(R.string.download_playing_out_of, currentPlayingIndex + 1, currentPlayingSize));
+ }
} else {
songTitleTextView.setText(null);
getImageLoader().loadImage(albumArtImageView, (Entry) null, true, false);
@@ -1199,10 +1211,11 @@ public class NowPlayingFragment extends SubsonicFragment implements OnGestureLis
scrollWhenLoaded = false;
}
- setSubtitle(context.getResources().getString(R.string.download_playing_out_of, currentPlayingIndex + 1, currentPlayingSize));
if(this.currentPlaying != currentPlaying) {
onSongChanged(currentPlaying, currentPlayingIndex);
onMetadataUpdate(currentPlaying != null ? currentPlaying.getSong() : null, DownloadService.METADATA_UPDATED_ALL);
+ } else {
+ setupSubtitle(currentPlayingIndex);
}
}
diff --git a/app/src/main/java/github/daneren2005/dsub/service/DownloadService.java b/app/src/main/java/github/daneren2005/dsub/service/DownloadService.java
index a4f88ee2..3e771d70 100644
--- a/app/src/main/java/github/daneren2005/dsub/service/DownloadService.java
+++ b/app/src/main/java/github/daneren2005/dsub/service/DownloadService.java
@@ -601,6 +601,9 @@ public class DownloadService extends Service {
}
editor.commit();
}
+ public boolean isArtistRadio() {
+ return artistRadio;
+ }
public synchronized void shuffle() {
Collections.shuffle(downloadList);