@@ -20,6 +20,7 @@ import vdr.jonglisto.model.EpgsearchSearchTimer
20
20
import vdr.jonglisto.model.Recording
21
21
import vdr.jonglisto.model.Timer
22
22
import vdr.jonglisto.model.VDRDiskStat
23
+ import vdr.jonglisto.model.VDROsd
23
24
import vdr.jonglisto.model.VdrPlugin
24
25
import vdr.jonglisto.util.DateTimeUtil
25
26
import vdr.jonglisto.util.Utils
@@ -283,7 +284,7 @@ class Parser {
283
284
return result
284
285
}
285
286
286
- def static parsePlugin (String line ) {
287
+ static def parsePlugin (String line ) {
287
288
val matcher = pluginPattern. matcher(line)
288
289
if (matcher. matches) {
289
290
return new VdrPlugin (matcher. group(1 ), matcher. group(2 ), matcher. group(3 ))
@@ -292,7 +293,7 @@ class Parser {
292
293
return null
293
294
}
294
295
295
- def static parseStat (String line ) {
296
+ static def parseStat (String line ) {
296
297
val matcher = statPattern. matcher(line)
297
298
if (matcher. matches) {
298
299
return new VDRDiskStat (Long . parseLong(matcher. group(1 )), Long . parseLong(matcher. group(2 )))
@@ -301,7 +302,7 @@ class Parser {
301
302
return new VDRDiskStat (0 ,0 )
302
303
}
303
304
304
- def static parseEpgsearchList (String line ) {
305
+ static def parseEpgsearchList (String line ) {
305
306
val result = new EpgsearchSearchTimer
306
307
val splitted = line. split(" :" )
307
308
@@ -323,7 +324,7 @@ class Parser {
323
324
return result
324
325
}
325
326
326
- def static parseEpgsearchCategory (String line ) {
327
+ static def parseEpgsearchCategory (String line ) {
327
328
val splitted = line. split(" \\ |" )
328
329
val result = new EpgsearchCategory
329
330
@@ -342,7 +343,7 @@ class Parser {
342
343
return result
343
344
}
344
345
345
- def static parseEpgsearchChannelGroup (String line ) {
346
+ static def parseEpgsearchChannelGroup (String line ) {
346
347
val splitted = line. split(" \\ |" ). stream. collect(Collectors . toList)
347
348
val result = new EpgsearchChannelGroup
348
349
@@ -352,6 +353,30 @@ class Parser {
352
353
return result
353
354
}
354
355
356
+ static def VDROsd parseRemoteOsd (List<String > input ) {
357
+ val osd = new VDROsd
358
+
359
+ input. forEach(s | {
360
+ val type = String . valueOf(s. charAt(0 ))
361
+ val line = s. substring(2 )
362
+
363
+ switch (type) {
364
+ case ' T' : osd. title = line
365
+ case ' C' : osd. addLayout(Integer . valueOf(line))
366
+ case ' I' : osd. addMenuItem(type, line)
367
+ case ' S' : osd. addMenuItem(type, line)
368
+ case ' X' : osd. textBlock = line
369
+ case ' R' : osd. red = line
370
+ case ' G' : osd. green = line
371
+ case ' Y' : osd. yellow = line
372
+ case ' B' : osd. blue = line
373
+ case ' M' : osd. statusMessage = line
374
+ }
375
+ })
376
+
377
+ return osd
378
+ }
379
+
355
380
/* helper methods */
356
381
private static def extractChannel (String line ) {
357
382
return line. substring(0 , line. indexOf(" " ))
0 commit comments