Skip to content

Commit 59d6d39

Browse files
author
Chris Bellew
committed
Updated tasker project:use regex directly in the Task, instead of storing it in a variable.
1 parent 3fcfbb5 commit 59d6d39

File tree

1 file changed

+51
-75
lines changed

1 file changed

+51
-75
lines changed

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

Lines changed: 51 additions & 75 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,26 @@
11
<TaskerData sr="" dvi="1" tv="4.2u3">
2-
<Profile sr="prof148" ve="2">
3-
<cdate>1400797081692</cdate>
2+
<Profile sr="prof50" ve="2">
3+
<cdate>1400873431393</cdate>
4+
<edate>1400873465734</edate>
5+
<id>50</id>
6+
<mid0>49</mid0>
7+
<nme>Voice Control For Plex (utter!)</nme>
8+
<Event sr="con0" ve="2">
9+
<cname>Voice Data</cname>
10+
<code>599</code>
11+
<Str sr="arg0" ve="3">com.brandall.nutter.action.VOICE_DATA</Str>
12+
<Int sr="arg1" val="0"/>
13+
<Int sr="arg2" val="0"/>
14+
<Str sr="arg3" ve="3"/>
15+
<Str sr="arg4" ve="3"/>
16+
</Event>
17+
</Profile>
18+
<Profile sr="prof51" ve="2">
19+
<cdate>1400873431393</cdate>
420
<clp>true</clp>
521
<edate>1400727519979</edate>
6-
<id>148</id>
7-
<mid0>144</mid0>
22+
<id>51</id>
23+
<mid0>46</mid0>
824
<nme>Voice Control For Plex (AutoVoice)</nme>
925
<State sr="con0">
1026
<code>20126</code>
@@ -83,37 +99,20 @@ All recognized commands without filter
8399
<Str sr="arg2" ve="3">AutoVoice Recognized</Str>
84100
</State>
85101
</Profile>
86-
<Profile sr="prof149" ve="2">
87-
<cdate>1400797081698</cdate>
88-
<clp>true</clp>
89-
<edate>1400727534640</edate>
90-
<id>149</id>
91-
<mid0>147</mid0>
92-
<nme>Voice Control For Plex (utter!)</nme>
93-
<Event sr="con0" ve="2">
94-
<cname>Voice Data</cname>
95-
<code>599</code>
96-
<Str sr="arg0" ve="3">com.brandall.nutter.action.VOICE_DATA</Str>
97-
<Int sr="arg1" val="0"/>
98-
<Int sr="arg2" val="0"/>
99-
<Str sr="arg3" ve="3"/>
100-
<Str sr="arg4" ve="3"/>
101-
</Event>
102-
</Profile>
103102
<Project sr="proj0">
104103
<cdate>1377124751229</cdate>
105104
<name>VoiceControlForPlex</name>
106-
<pids>148,149</pids>
107-
<tids>145,144,147,146</tids>
105+
<pids>50,51</pids>
106+
<tids>49,46,48</tids>
108107
<Img sr="icon" ve="2">
109108
<cls>com.atomjack.vcfplib.MainActivity</cls>
110109
<pkg>com.atomjack.vcfp</pkg>
111110
</Img>
112111
</Project>
113-
<Task sr="task144">
112+
<Task sr="task46">
114113
<cdate>1400192106190</cdate>
115114
<edate>1400727519979</edate>
116-
<id>144</id>
115+
<id>46</id>
117116
<Action sr="act0" ve="3">
118117
<code>22851</code>
119118
<Bundle sr="arg0">
@@ -131,24 +130,10 @@ All recognized commands without filter
131130
<Int sr="arg3" val="0"/>
132131
</Action>
133132
</Task>
134-
<Task sr="task145">
135-
<cdate>1400796521385</cdate>
136-
<edate>1400797125762</edate>
137-
<id>145</id>
138-
<nme>SetCommands</nme>
139-
<pri>10</pri>
140-
<Action sr="act0" ve="3">
141-
<code>547</code>
142-
<Str sr="arg0" ve="3">%Commands</Str>
143-
<Str sr="arg1" ve="3">^(((watch|resume watching|listen to) )|((offset|timecode) (.*))|((pause|stop|resume) playback))(on )?</Str>
144-
<Int sr="arg2" val="0"/>
145-
<Int sr="arg3" val="0"/>
146-
</Action>
147-
</Task>
148-
<Task sr="task146">
133+
<Task sr="task48">
149134
<cdate>1376944785561</cdate>
150135
<edate>1400727723455</edate>
151-
<id>146</id>
136+
<id>48</id>
152137
<nme>VoiceControlForPlex</nme>
153138
<Action sr="act0" ve="3">
154139
<code>547</code>
@@ -178,38 +163,29 @@ All recognized commands without filter
178163
<pkg>com.brandall.nutter</pkg>
179164
</Img>
180165
</Task>
181-
<Task sr="task147">
166+
<Task sr="task49">
182167
<cdate>1376675516238</cdate>
183-
<edate>1400797175710</edate>
184-
<id>147</id>
168+
<edate>1400873532538</edate>
169+
<id>49</id>
185170
<nme>VoiceDataReceiver</nme>
186171
<pri>10</pri>
187172
<Action sr="act0" ve="3">
188-
<code>130</code>
189-
<Str sr="arg0" ve="3">SetCommands</Str>
190-
<Int sr="arg1" val="0"/>
191-
<Int sr="arg2" val="10"/>
192-
<Str sr="arg3" ve="3"/>
193-
<Str sr="arg4" ve="3"/>
194-
<Str sr="arg5" ve="3"/>
195-
</Action>
196-
<Action sr="act1" ve="3">
197173
<code>547</code>
198174
<label>Used in the loop below</label>
199175
<Str sr="arg0" ve="3">%voice_data_count</Str>
200176
<Str sr="arg1" ve="3">1</Str>
201177
<Int sr="arg2" val="1"/>
202178
<Int sr="arg3" val="0"/>
203179
</Action>
204-
<Action sr="act10" ve="3">
180+
<Action sr="act1" ve="3">
205181
<code>547</code>
206-
<label>Set the voice response for utter!</label>
207-
<Str sr="arg0" ve="3">%response</Str>
208-
<Str sr="arg1" ve="3">Tasker didn't understand </Str>
209-
<Int sr="arg2" val="0"/>
182+
<label>Set the loop count to the voice data size</label>
183+
<Str sr="arg0" ve="3">%voice_data_size</Str>
184+
<Str sr="arg1" ve="3">%voice_data(#)</Str>
185+
<Int sr="arg2" val="1"/>
210186
<Int sr="arg3" val="0"/>
211187
</Action>
212-
<Action sr="act11" ve="3">
188+
<Action sr="act10" ve="3">
213189
<code>2272</code>
214190
<label>Speak the response</label>
215191
<Bundle sr="arg0">
@@ -243,31 +219,23 @@ All recognized commands without filter
243219
<Int sr="arg3"/>
244220
</Action>
245221
<Action sr="act2" ve="3">
246-
<code>547</code>
247-
<label>Set the loop count to the voice data size</label>
248-
<Str sr="arg0" ve="3">%voice_data_size</Str>
249-
<Str sr="arg1" ve="3">%voice_data(#)</Str>
250-
<Int sr="arg2" val="1"/>
251-
<Int sr="arg3" val="0"/>
252-
</Action>
253-
<Action sr="act3" ve="3">
254222
<code>39</code>
255223
<label>Loop through the voice data</label>
256224
<Str sr="arg0" ve="3">%voice_data</Str>
257225
<Str sr="arg1" ve="3">1:%voice_data_size</Str>
258226
</Action>
259-
<Action sr="act4" ve="3">
227+
<Action sr="act3" ve="3">
260228
<code>37</code>
261229
<label>Compare each voice data string to each command</label>
262230
<lhs>%voice_data(%voice_data_count)</lhs>
263231
<op>11</op>
264-
<rhs>%Commands</rhs>
232+
<rhs>^(((watch|resume watching|listen to) )|((offset|timecode) (.*))|((pause|stop|resume) playback))(on )?</rhs>
265233
</Action>
266-
<Action sr="act5" ve="3">
234+
<Action sr="act4" ve="3">
267235
<code>300</code>
268-
<label>A command has been matched! The number of the command in your master command array, corresponds to the task that will now be performed.</label>
236+
<label>Spoken query matches what Voice Control for Plex will respond to. So let's pass that query on to the app.</label>
269237
</Action>
270-
<Action sr="act6" ve="3">
238+
<Action sr="act5" ve="3">
271239
<code>130</code>
272240
<label>Break loops &amp; perform corresponding task</label>
273241
<Str sr="arg0" ve="3">VoiceControlForPlex</Str>
@@ -277,21 +245,29 @@ All recognized commands without filter
277245
<Str sr="arg4" ve="3"/>
278246
<Str sr="arg5" ve="3"/>
279247
</Action>
280-
<Action sr="act7" ve="3">
248+
<Action sr="act6" ve="3">
281249
<code>38</code>
282250
<label>No match</label>
283251
</Action>
284-
<Action sr="act8" ve="3">
252+
<Action sr="act7" ve="3">
285253
<code>547</code>
286254
<Str sr="arg0" ve="3">%voice_data_count</Str>
287255
<Str sr="arg1" ve="3">%voice_data_count+1</Str>
288256
<Int sr="arg2" val="1"/>
289257
<Int sr="arg3" val="0"/>
290258
</Action>
291-
<Action sr="act9" ve="3">
259+
<Action sr="act8" ve="3">
292260
<code>40</code>
293261
<label>End of loops with no matches</label>
294262
</Action>
263+
<Action sr="act9" ve="3">
264+
<code>547</code>
265+
<label>Set the voice response for utter!</label>
266+
<Str sr="arg0" ve="3">%response</Str>
267+
<Str sr="arg1" ve="3">Tasker didn't understand </Str>
268+
<Int sr="arg2" val="0"/>
269+
<Int sr="arg3" val="0"/>
270+
</Action>
295271
<Img sr="icn" ve="2">
296272
<cls>com.brandall.nutter.ActivityHomeFragment</cls>
297273
<pkg>com.brandall.nutter</pkg>

0 commit comments

Comments
 (0)