aboutsummaryrefslogtreecommitdiff
path: root/app/src/main/java/github/daneren2005/dsub/service/DownloadFile.java
diff options
context:
space:
mode:
Diffstat (limited to 'app/src/main/java/github/daneren2005/dsub/service/DownloadFile.java')
-rw-r--r--app/src/main/java/github/daneren2005/dsub/service/DownloadFile.java14
1 files changed, 14 insertions, 0 deletions
diff --git a/app/src/main/java/github/daneren2005/dsub/service/DownloadFile.java b/app/src/main/java/github/daneren2005/dsub/service/DownloadFile.java
index e4bab798..d1c594ce 100644
--- a/app/src/main/java/github/daneren2005/dsub/service/DownloadFile.java
+++ b/app/src/main/java/github/daneren2005/dsub/service/DownloadFile.java
@@ -29,6 +29,8 @@ import android.content.Context;
import android.net.wifi.WifiManager;
import android.os.PowerManager;
import android.util.Log;
+
+import github.daneren2005.dsub.domain.InternetRadioStation;
import github.daneren2005.dsub.domain.MusicDirectory;
import github.daneren2005.dsub.util.Constants;
import github.daneren2005.dsub.util.SilentBackgroundTask;
@@ -377,6 +379,18 @@ public class DownloadFile implements BufferFile {
}
}
+ public boolean isStream() {
+ return song != null && song instanceof InternetRadioStation;
+ }
+ public String getStream() {
+ if(song != null && song instanceof InternetRadioStation) {
+ InternetRadioStation station = (InternetRadioStation) song;
+ return station.getStreamUrl();
+ } else {
+ return null;
+ }
+ }
+
@Override
public String toString() {
return "DownloadFile (" + song + ")";