aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorScott Jackson <daneren2005@gmail.com>2015-01-26 08:40:38 -0800
committerScott Jackson <daneren2005@gmail.com>2015-01-26 08:40:38 -0800
commit88a88aa43f2d5696e08cc036659b1464af3805e6 (patch)
tree600744071d58bfc39c800caa8e53fac2ca9260c5 /src
parentf3fe777713adfe4c5aedbb62112022d22c679a0f (diff)
downloaddsub-88a88aa43f2d5696e08cc036659b1464af3805e6.tar.gz
dsub-88a88aa43f2d5696e08cc036659b1464af3805e6.tar.bz2
dsub-88a88aa43f2d5696e08cc036659b1464af3805e6.zip
Replace internal url with external before applying redirect
Diffstat (limited to 'src')
-rw-r--r--src/github/daneren2005/dsub/service/ChromeCastController.java3
-rw-r--r--src/github/daneren2005/dsub/service/DLNAController.java3
-rw-r--r--src/github/daneren2005/dsub/service/RESTMusicService.java2
3 files changed, 2 insertions, 6 deletions
diff --git a/src/github/daneren2005/dsub/service/ChromeCastController.java b/src/github/daneren2005/dsub/service/ChromeCastController.java
index 40f5d73d..f5def994 100644
--- a/src/github/daneren2005/dsub/service/ChromeCastController.java
+++ b/src/github/daneren2005/dsub/service/ChromeCastController.java
@@ -282,8 +282,6 @@ public class ChromeCastController extends RemoteController {
} else {
url = musicService.getMusicUrl(downloadService, song, currentPlaying.getBitRate());
}
-
- url = Util.replaceInternalUrl(downloadService, url);
}
// Setup song/video information
@@ -300,7 +298,6 @@ public class ChromeCastController extends RemoteController {
String coverArt = "";
if(proxy == null) {
coverArt = musicService.getCoverArtUrl(downloadService, song);
- coverArt = Util.replaceInternalUrl(downloadService, coverArt);
meta.addImage(new WebImage(Uri.parse(coverArt)));
} else {
File coverArtFile = FileUtil.getAlbumArtFile(downloadService, song);
diff --git a/src/github/daneren2005/dsub/service/DLNAController.java b/src/github/daneren2005/dsub/service/DLNAController.java
index 4719a71f..8e799167 100644
--- a/src/github/daneren2005/dsub/service/DLNAController.java
+++ b/src/github/daneren2005/dsub/service/DLNAController.java
@@ -370,8 +370,6 @@ public class DLNAController extends RemoteController {
} else {
url = musicService.getMusicUrl(downloadService, song, currentPlaying.getBitRate());
}
-
- url = Util.replaceInternalUrl(downloadService, url);
}
// Create metadata for entry
@@ -410,7 +408,6 @@ public class DLNAController extends RemoteController {
String coverArt = null;
if(proxy == null) {
coverArt = musicService.getCoverArtUrl(downloadService, song);
- coverArt = Util.replaceInternalUrl(downloadService, coverArt);
} else {
File coverArtFile = FileUtil.getAlbumArtFile(downloadService, song);
if(coverArtFile != null && coverArtFile.exists()) {
diff --git a/src/github/daneren2005/dsub/service/RESTMusicService.java b/src/github/daneren2005/dsub/service/RESTMusicService.java
index c7301cfd..00910f70 100644
--- a/src/github/daneren2005/dsub/service/RESTMusicService.java
+++ b/src/github/daneren2005/dsub/service/RESTMusicService.java
@@ -602,6 +602,7 @@ public class RESTMusicService implements MusicService {
StringBuilder builder = new StringBuilder(getRestUrl(context, "getCoverArt"));
builder.append("&id=").append(entry.getCoverArt());
String url = builder.toString();
+ url = Util.replaceInternalUrl(context, url);
url = rewriteUrlWithRedirect(context, url);
return url;
}
@@ -742,6 +743,7 @@ public class RESTMusicService implements MusicService {
}
String url = builder.toString();
+ url = Util.replaceInternalUrl(context, url);
url = rewriteUrlWithRedirect(context, url);
Log.i(TAG, "Using music URL: " + stripUrlInfo(url));
return url;