@@ -30,7 +30,7 @@ import static extension org.apache.commons.lang3.StringUtils.*
30
30
31
31
@Log (" jonglisto.svdrp.client" )
32
32
class Parser {
33
- static val namePattern = Pattern . compile(" (\\ d+) (.*?) (.*?) (;(.*?))*:(\\ d+):(.*?)$" )
33
+ static val namePattern = Pattern . compile(" (\\ d+) (.*?)(;(.*?))*:(\\ d+):(.*?)$" )
34
34
static val recordingPattern = Pattern . compile(" (\\ d+) (\\ d{2}.\\ d{2}.\\ d{2} \\ d{2}:\\ d{2}) (\\ d+:\\ d+)(\\ *?) (.*)$" )
35
35
static val recordingDateFormatter = DateTimeFormatter . ofPattern(" dd.MM.yy HH:mm" );
36
36
static val pluginPattern = Pattern . compile(" ^(.*?) (.*?) - (.*?)$" )
@@ -66,18 +66,19 @@ class Parser {
66
66
ch. encrypted = " 0" != sp. get(8 )
67
67
ch. source = sp. get(3 )
68
68
ch. number = Integer . valueOf(matcher. group(1 ))
69
- ch. id = matcher. group(2 )
70
- ch. bouquet = matcher. group(5 )
71
- ch. frequence = Long . valueOf(matcher. group(6 ))
69
+ ch. id = sp. get(3 ) + " -" + sp. get(10 ) + " -" + sp. get(11 ) + " -" + sp. get(9 )
70
+
71
+ ch. bouquet = matcher. group(4 )
72
+ ch. frequence = Long . valueOf(matcher. group(5 ))
72
73
if (ch. frequence == 0 ) {
73
74
ch. frequence = null
74
75
}
75
76
76
- val idx2 = matcher. group(3 ). indexOf(" ," )
77
+ val idx2 = matcher. group(2 ). indexOf(" ," )
77
78
if (idx2 == - 1 ) {
78
- ch. name = matcher. group(3 ). trim
79
+ ch. name = matcher. group(2 ). trim
79
80
} else {
80
- ch. name = matcher. group(3 ). substring(0 , idx2). trim
81
+ ch. name = matcher. group(2 ). substring(0 , idx2). trim
81
82
}
82
83
83
84
ch. normalizedName = Utils . normalizeChannelName(ch. name)
0 commit comments