@@ -798,8 +798,10 @@ public void onSuccess(MediaContainer mc)
798
798
PlexVideo latestVideo = null ;
799
799
for (int j =0 ;j <mc .videos .size ();j ++) {
800
800
PlexVideo video = mc .videos .get (j );
801
- if (latestVideo == null || latestVideo .airDate ().before (video .airDate ()))
801
+ if (latestVideo == null || latestVideo .airDate ().before (video .airDate ())) {
802
+ video .setShowTitle (video .getGrandparentTitle ());
802
803
latestVideo = video ;
804
+ }
803
805
}
804
806
latestVideo .setServer (show .server );
805
807
Logger .d ("Found video: %s" , latestVideo .airDate ());
@@ -952,6 +954,7 @@ private void onMovieSearchFinished(String queryTerm) {
952
954
if (videos .get (i ).getTitle ().toLowerCase ().equals (queryTerm .toLowerCase ())) {
953
955
exactMatch = true ;
954
956
playVideo (videos .get (i ));
957
+ feedback ("Now watching " + videos .get (i ).getTitle () + " on " + client .getName ());
955
958
break ;
956
959
}
957
960
}
@@ -971,19 +974,16 @@ private void onMovieSearchFinished(String queryTerm) {
971
974
}
972
975
973
976
private void feedback (String text ) {
974
- if (mPrefs .getInt ("feedback" , MainActivity .FEEDBACK_VOICE ) == MainActivity .FEEDBACK_VOICE ) {
975
- GoogleSearchApi .speak (this , text );
976
- } else {
977
- Toast .makeText (this , text , Toast .LENGTH_SHORT ).show ();
978
- }
977
+ // if(mPrefs.getInt("feedback", MainActivity.FEEDBACK_VOICE) == MainActivity.FEEDBACK_VOICE) {
978
+ // GoogleSearchApi.speak(this, text);
979
+ // } else {
980
+ Toast .makeText (this , text , Toast .LENGTH_SHORT ).show ();
981
+ // }
979
982
Logger .d (text );
980
983
}
981
984
982
985
private void playAlbum (final PlexDirectory album ) {
983
986
String url = "http://" + album .server .getAddress () + ":" + album .server .getPort () + album .key ;
984
- // if(mPrefs.getBoolean("resume", false) || resumePlayback) {
985
- // url += "&viewOffset=" + track.getViewOffset();
986
- // }
987
987
PlexHttpClient .get (url , null , new PlexHttpMediaContainerHandler ()
988
988
{
989
989
@ Override
0 commit comments