File tree Expand file tree Collapse file tree 2 files changed +8
-8
lines changed Expand file tree Collapse file tree 2 files changed +8
-8
lines changed Original file line number Diff line number Diff line change @@ -22,7 +22,7 @@ Below are examples of what to say to Google Now to trigger playback. Sentence fr
22
22
### For TV Shows:
23
23
"** Watch Season** * 1* ** Episode** * 1* ** of** * Homeland* "
24
24
25
- "** Watch** * Homeland * ** Season** * 1* ** Episode** * 1 * "
25
+ "** Watch** * The Newsroom * ** Season** * 1* ** Episode** * 2 * "
26
26
27
27
"** Watch** * Breaking Bad* ** Season** * 5* ** Episode** * 8* "
28
28
Original file line number Diff line number Diff line change @@ -326,22 +326,22 @@ private void handleVoiceSearch() {
326
326
}
327
327
}
328
328
if (mediaType .equals ("" )) {
329
- p = Pattern .compile ("watch (.*) episode (.*)" );
329
+ p = Pattern .compile ("watch( the)? latest episode of (.*)" );
330
330
matcher = p .matcher (queryText );
331
+
331
332
if (matcher .find ()) {
332
333
mediaType = "show" ;
333
- episodeSpecified = matcher . group ( 2 ) ;
334
- showSpecified = matcher .group (1 );
334
+ latest = true ;
335
+ queryTerm = matcher .group (2 );
335
336
}
336
337
}
337
338
if (mediaType .equals ("" )) {
338
- p = Pattern .compile ("watch( the)? latest episode of (.*)" );
339
+ p = Pattern .compile ("watch (.*) episode (.*)" );
339
340
matcher = p .matcher (queryText );
340
-
341
341
if (matcher .find ()) {
342
342
mediaType = "show" ;
343
- latest = true ;
344
- queryTerm = matcher .group (2 );
343
+ episodeSpecified = matcher . group ( 2 ) ;
344
+ showSpecified = matcher .group (1 );
345
345
}
346
346
}
347
347
// Lastly, try to find a movie matching whatever comes after "watch"
You can’t perform that action at this time.
0 commit comments