From 88a88aa43f2d5696e08cc036659b1464af3805e6 Mon Sep 17 00:00:00 2001 From: Scott Jackson Date: Mon, 26 Jan 2015 08:40:38 -0800 Subject: Replace internal url with external before applying redirect --- src/github/daneren2005/dsub/service/ChromeCastController.java | 3 --- src/github/daneren2005/dsub/service/DLNAController.java | 3 --- src/github/daneren2005/dsub/service/RESTMusicService.java | 2 ++ 3 files changed, 2 insertions(+), 6 deletions(-) (limited to 'src') 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; -- cgit v1.2.3