diff options
author | Scott Jackson <daneren2005@gmail.com> | 2014-04-08 22:54:15 -0700 |
---|---|---|
committer | Scott Jackson <daneren2005@gmail.com> | 2014-04-08 22:54:15 -0700 |
commit | 5b2c0aa9c2de27653537a37b1d29dd12acfc853f (patch) | |
tree | 95168028814ebf749069dc431139e02a44e25598 /src/github | |
parent | 2b6e224b7338c2be7d12a896089efa7d48234aec (diff) | |
download | dsub-5b2c0aa9c2de27653537a37b1d29dd12acfc853f.tar.gz dsub-5b2c0aa9c2de27653537a37b1d29dd12acfc853f.tar.bz2 dsub-5b2c0aa9c2de27653537a37b1d29dd12acfc853f.zip |
Fix https servers on Chromecast
Diffstat (limited to 'src/github')
-rw-r--r-- | src/github/daneren2005/dsub/service/ChromeCastController.java | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/github/daneren2005/dsub/service/ChromeCastController.java b/src/github/daneren2005/dsub/service/ChromeCastController.java index db4af2e8..639c7ebe 100644 --- a/src/github/daneren2005/dsub/service/ChromeCastController.java +++ b/src/github/daneren2005/dsub/service/ChromeCastController.java @@ -349,9 +349,11 @@ public class ChromeCastController extends RemoteController { if(url.indexOf("https") != -1) { SharedPreferences prefs = Util.getPreferences(downloadService); int instance = prefs.getInt(Constants.PREFERENCES_KEY_SERVER_INSTANCE, 1); - String externalUrl = prefs.getString(Constants.PREFERENCES_KEY_SERVER_URL + instance, null); String internalUrl = prefs.getString(Constants.PREFERENCES_KEY_SERVER_INTERNAL_URL + instance, null); - url = url.replace(internalUrl, externalUrl); + if(internalUrl != null && !"".equals(internalUrl)) { + String externalUrl = prefs.getString(Constants.PREFERENCES_KEY_SERVER_URL + instance, null); + url = url.replace(internalUrl, externalUrl); + } } // Use separate profile for Chromecast so users can do ogg on phone, mp3 for CC |