Skip to content

Commit 6bdac61

Browse files
author
Chris Bellew
committed
Added what's new dialog; Centralized matching regex; Use new Feedback class in MainActivity; Remove import & install buttons.
1 parent a801486 commit 6bdac61

File tree

17 files changed

+478
-214
lines changed

17 files changed

+478
-214
lines changed

Voice Control For Plex/src/main/assets/VoiceControlForPlex.prj.xml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -55,9 +55,9 @@
5555
<TriggerWordRegex>false</TriggerWordRegex>
5656
<TriggerWordRegex-type>java.lang.Boolean</TriggerWordRegex-type>
5757
<com.twofortyfouram.locale.intent.extra.BLURB>Event Behaviour: true
58-
Command: "^(((watch|resume watching|listen to) )|((offset|timecode) (.*))|((pause|stop|resume) playback))(on )? (regex)"</com.twofortyfouram.locale.intent.extra.BLURB>
58+
Command: "%RECOGNITION_REGEX% (regex)"</com.twofortyfouram.locale.intent.extra.BLURB>
5959
<com.twofortyfouram.locale.intent.extra.BLURB-type>java.lang.String</com.twofortyfouram.locale.intent.extra.BLURB-type>
60-
<configcommand>^(((watch|resume watching|listen to) )|((offset|timecode) (.*))|((pause|stop|resume) playback))(on )?</configcommand>
60+
<configcommand>%RECOGNITION_REGEX%</configcommand>
6161
<configcommand-type>java.lang.String</configcommand-type>
6262
<configcommandid>&lt;null&gt;</configcommandid>
6363
<configcommandid-type>java.lang.String</configcommandid-type>
@@ -229,7 +229,7 @@ All recognized commands without filter
229229
<label>Compare each voice data string to each command</label>
230230
<lhs>%voice_data(%voice_data_count)</lhs>
231231
<op>11</op>
232-
<rhs>^(((watch|resume watching|listen to) )|((offset|timecode) (.*))|((pause|stop|resume) playback))(on )?</rhs>
232+
<rhs>%RECOGNITION_REGEX%</rhs>
233233
</Action>
234234
<Action sr="act4" ve="3">
235235
<code>300</code>

Voice Control For Plex/src/main/java/com/atomjack/vcfp/Feedback.java

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,13 @@ public void onInit(int i) {
3636
}
3737
}
3838

39+
public void destroy() {
40+
if(errorsTts != null)
41+
errorsTts.shutdown();
42+
if(feedbackTts != null)
43+
feedbackTts.shutdown();
44+
}
45+
3946
public void m(String text, Object... arguments) {
4047
text = String.format(text, arguments);
4148
m(text);

Voice Control For Plex/src/main/java/com/atomjack/vcfp/ListenerWidget.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,8 @@ public void onUpdate(Context context, AppWidgetManager appWidgetManager,int[] ap
2626
R.layout.widget_layout);
2727

2828
Intent serviceIntent = new Intent(context, PlexSearch.class);
29-
// SecureRandom random = new SecureRandom();
30-
// serviceIntent.setData(Uri.parse(new BigInteger(130, random).toString(32)));
29+
SecureRandom random = new SecureRandom();
30+
serviceIntent.setData(Uri.parse(new BigInteger(130, random).toString(32)));
3131
PendingIntent resultsPendingIntent = PendingIntent.getService(context, 0, serviceIntent, Intent.FLAG_ACTIVITY_NEW_TASK);
3232

3333
Intent listenerIntent = new Intent(RecognizerIntent.ACTION_RECOGNIZE_SPEECH);

0 commit comments

Comments
 (0)