diff options
Diffstat (limited to 'src/github/daneren2005/dsub/service/RemoteController.java')
-rw-r--r-- | src/github/daneren2005/dsub/service/RemoteController.java | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/github/daneren2005/dsub/service/RemoteController.java b/src/github/daneren2005/dsub/service/RemoteController.java index 02deaf85..4483598c 100644 --- a/src/github/daneren2005/dsub/service/RemoteController.java +++ b/src/github/daneren2005/dsub/service/RemoteController.java @@ -32,6 +32,7 @@ import java.util.concurrent.LinkedBlockingQueue; import github.daneren2005.dsub.R; import github.daneren2005.dsub.domain.RemoteStatus; +import github.daneren2005.serverproxy.WebProxy; public abstract class RemoteController { private static final String TAG = RemoteController.class.getSimpleName(); @@ -95,4 +96,13 @@ public abstract class RemoteController { queue.clear(); } } + + protected WebProxy createWebProxy() { + MusicService musicService = MusicServiceFactory.getMusicService(downloadService); + if(musicService instanceof CachedMusicService) { + return new WebProxy(downloadService, ((CachedMusicService)musicService).getMusicService().getHttpClient()); + } else { + return new WebProxy(downloadService); + } + } } |