@@ -113,7 +113,7 @@ private void startup() {
113
113
if (searchDialog == null ) {
114
114
searchDialog = new Dialog (this );
115
115
}
116
- searchDialog .setCancelable (false );
116
+ searchDialog .setCancelable (true );
117
117
searchDialog .setContentView (R .layout .search_popup );
118
118
searchDialog .setTitle ("Searching" );
119
119
@@ -179,10 +179,10 @@ private void setClient() {
179
179
serversScanned = 0 ;
180
180
clients = new ArrayList <PlexClient >();
181
181
for (PlexServer server : plexmediaServers .values ()) {
182
- Log .v (TAG , "ip: " + server .getIPAddress ());
182
+ Log .v (TAG , "ip: " + server .getAddress ());
183
183
Log .v (TAG , "port: " + server .getPort ());
184
184
try {
185
- String url = "http://" + server .getIPAddress () + ":" + server .getPort () + "/clients" ;
185
+ String url = "http://" + server .getAddress () + ":" + server .getPort () + "/clients" ;
186
186
AsyncHttpClient httpClient = new AsyncHttpClient ();
187
187
httpClient .get (url , new AsyncHttpResponseHandler () {
188
188
@ Override
@@ -424,7 +424,7 @@ private void searchForSong(final String artist, final String track) {
424
424
for (int i =0 ;i <server .getMusicSections ().size ();i ++) {
425
425
String section = server .getMusicSections ().get (i );
426
426
try {
427
- String url = "http://" + server .getIPAddress () + ":" + server .getPort () + "/library/sections/" + section + "/search?type=10&query=" + track ;
427
+ String url = "http://" + server .getAddress () + ":" + server .getPort () + "/library/sections/" + section + "/search?type=10&query=" + track ;
428
428
Log .v (TAG , "URL: " + url );
429
429
AsyncHttpClient httpClient = new AsyncHttpClient ();
430
430
httpClient .get (url , new AsyncHttpResponseHandler () {
@@ -489,7 +489,7 @@ private void doShowSearch(String episodeSpecified, final String showSpecified) {
489
489
for (int i =0 ;i <server .getTvSections ().size ();i ++) {
490
490
String section = server .getTvSections ().get (i );
491
491
try {
492
- String url = "http://" + server .getIPAddress () + ":" + server .getPort () + "/library/sections/" + section + "/search?type=4&query=" + episodeSpecified ;
492
+ String url = "http://" + server .getAddress () + ":" + server .getPort () + "/library/sections/" + section + "/search?type=4&query=" + episodeSpecified ;
493
493
AsyncHttpClient httpClient = new AsyncHttpClient ();
494
494
httpClient .get (url , new AsyncHttpResponseHandler () {
495
495
@ Override
@@ -563,7 +563,7 @@ private void doShowSearch(final String queryTerm, final String season, final Str
563
563
for (int i =0 ;i <server .getTvSections ().size ();i ++) {
564
564
String section = server .getTvSections ().get (i );
565
565
try {
566
- String url = "http://" + server .getIPAddress () + ":" + server .getPort () + "/library/sections/" + section + "/search?type=2&query=" + queryTerm ;
566
+ String url = "http://" + server .getAddress () + ":" + server .getPort () + "/library/sections/" + section + "/search?type=2&query=" + queryTerm ;
567
567
AsyncHttpClient httpClient = new AsyncHttpClient ();
568
568
httpClient .get (url , new AsyncHttpResponseHandler () {
569
569
@ Override
@@ -612,7 +612,7 @@ private void doEpisodeSearch(String queryTerm, final String season, final String
612
612
final PlexDirectory show = shows .get (0 );
613
613
Log .v (TAG , "Show key: " + show .getKey ());
614
614
try {
615
- String url = "http://" + server .getIPAddress () + ":" + server .getPort () + "" + show .getKey ();
615
+ String url = "http://" + server .getAddress () + ":" + server .getPort () + "" + show .getKey ();
616
616
AsyncHttpClient httpClient = new AsyncHttpClient ();
617
617
httpClient .get (url , new AsyncHttpResponseHandler () {
618
618
@ Override
@@ -644,7 +644,7 @@ public void onSuccess(String response) {
644
644
return ;
645
645
} else if (foundSeason != null ) {
646
646
try {
647
- String url = "http://" + server .getIPAddress () + ":" + server .getPort () + "" + foundSeason .getKey ();
647
+ String url = "http://" + server .getAddress () + ":" + server .getPort () + "" + foundSeason .getKey ();
648
648
AsyncHttpClient httpClient = new AsyncHttpClient ();
649
649
httpClient .get (url , new AsyncHttpResponseHandler () {
650
650
@ Override
@@ -715,7 +715,7 @@ private void doLatestEpisodeSearch(final String queryTerm) {
715
715
for (int i =0 ;i <server .getTvSections ().size ();i ++) {
716
716
String section = server .getTvSections ().get (i );
717
717
try {
718
- String url = "http://" + server .getIPAddress () + ":" + server .getPort () + "/library/sections/" + section + "/search?type=2&query=" + queryTerm ;
718
+ String url = "http://" + server .getAddress () + ":" + server .getPort () + "/library/sections/" + section + "/search?type=2&query=" + queryTerm ;
719
719
AsyncHttpClient httpClient = new AsyncHttpClient ();
720
720
httpClient .get (url , new AsyncHttpResponseHandler () {
721
721
@ Override
@@ -755,7 +755,7 @@ private void doLatestEpisode() {
755
755
// For now, just grab the latest show by season/episode
756
756
try {
757
757
final PlexDirectory show = shows .get (0 );
758
- String url = "http://" + show .server .getIPAddress () + ":" + show .server .getPort () + "/library/metadata/" + show .ratingKey + "/allLeaves" ;
758
+ String url = "http://" + show .server .getAddress () + ":" + show .server .getPort () + "/library/metadata/" + show .ratingKey + "/allLeaves" ;
759
759
AsyncHttpClient httpClient = new AsyncHttpClient ();
760
760
httpClient .get (url , new AsyncHttpResponseHandler () {
761
761
@ Override
@@ -803,7 +803,7 @@ private void doNextEpisodeSearch(final String queryTerm) {
803
803
for (int i =0 ;i <server .getTvSections ().size ();i ++) {
804
804
String section = server .getTvSections ().get (i );
805
805
try {
806
- String url = "http://" + server .getIPAddress () + ":" + server .getPort () + "/library/sections/" + section + "/onDeck" ;
806
+ String url = "http://" + server .getAddress () + ":" + server .getPort () + "/library/sections/" + section + "/onDeck" ;
807
807
AsyncHttpClient httpClient = new AsyncHttpClient ();
808
808
httpClient .get (url , new AsyncHttpResponseHandler () {
809
809
@ Override
@@ -870,7 +870,7 @@ private void doMovieSearch(String mediaType, final String queryTerm) {
870
870
for (int i =0 ;i <server .getMovieSections ().size ();i ++) {
871
871
String section = server .getMovieSections ().get (i );
872
872
try {
873
- String url = "http://" + server .getIPAddress () + ":" + server .getPort () + "/library/sections/" + section + "/search?type=1&query=" + queryTerm ;
873
+ String url = "http://" + server .getAddress () + ":" + server .getPort () + "/library/sections/" + section + "/search?type=1&query=" + queryTerm ;
874
874
AsyncHttpClient httpClient = new AsyncHttpClient ();
875
875
httpClient .get (url , new AsyncHttpResponseHandler () {
876
876
@ Override
@@ -992,7 +992,7 @@ public void onSuccess(String response) {
992
992
if (!track .getThumb ().equals ("" )) {
993
993
// final RelativeLayout layout = (RelativeLayout)findViewById(R.id.background);
994
994
try {
995
- final String url = "http://" + track .getServer ().getIPAddress () + ":" + track .getServer ().getPort () + track .getThumb ();
995
+ final String url = "http://" + track .getServer ().getAddress () + ":" + track .getServer ().getPort () + track .getThumb ();
996
996
Log .v (TAG , "url: " + url );
997
997
AsyncHttpClient httpClient = new AsyncHttpClient ();
998
998
httpClient .get (url , new BinaryHttpResponseHandler () {
@@ -1093,7 +1093,7 @@ public void onSuccess(String response) {
1093
1093
if (!video .getThumb ().equals ("" )) {
1094
1094
final ScrollView layout = (ScrollView )findViewById (R .id .background );
1095
1095
try {
1096
- final String url = "http://" + video .getServer ().getIPAddress () + ":" + video .getServer ().getPort () + video .getThumb ();
1096
+ final String url = "http://" + video .getServer ().getAddress () + ":" + video .getServer ().getPort () + video .getThumb ();
1097
1097
Log .v (TAG , "url: " + url );
1098
1098
AsyncHttpClient httpClient = new AsyncHttpClient ();
1099
1099
httpClient .get (url , new BinaryHttpResponseHandler () {
0 commit comments