[RELEASE] iPlayer - BBC Video and Music Plugin (UK only!) - Printable Version +- Kodi Community Forum (https://forum.kodi.tv) +-- Forum: Support (https://forum.kodi.tv/forumdisplay.php?fid=33) +--- Forum: Add-on Support (https://forum.kodi.tv/forumdisplay.php?fid=27) +---- Forum: Video Add-ons (https://forum.kodi.tv/forumdisplay.php?fid=154) +---- Thread: [RELEASE] iPlayer - BBC Video and Music Plugin (UK only!) (/showthread.php?tid=51322) Pages:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
|
RE: [RELEASE] iPlayer - BBC Video and Music Plugin (UK only!) - muncow - 2014-11-20 Hi, thanks for your work on fixing this. The HD streams are working great for me. However, is there any chance of getting the none HD BBC1 streams added? The SD streams have the regional content, and the HD streams do not. RE: [RELEASE] iPlayer - BBC Video and Music Plugin (UK only!) - exobuzz - 2014-11-21 2.6.6 released download: https://drive.google.com/file/d/0B_knGioK16E6STJjTzVyZjdyWHM/view?usp=sharing changes: 2.6.6 * use SetResolvedUrl for playback - fixes playback from information window and will allow easier calling from other plugins / web service etc * various code cleanups / fixes RE: [RELEASE] iPlayer - BBC Video and Music Plugin (UK only!) - exobuzz - 2014-11-22 sorry, found a few more issues. Need to fix up live radio. RE: [RELEASE] iPlayer - BBC Video and Music Plugin (UK only!) - exobuzz - 2014-11-22 2.6.7 released download: https://drive.google.com/file/d/0B_knGioK16E6b0dwQmkxcGJWVXc/view?usp=sharing changes: 2.6.7 * support for mediaselector v5 (and settings to fallback to 4) * fixed live radio * new elementtree based listparser to replace horrible regexp hackery * fixed radio shows missing summary info * include aired / episode number for episodes * drop script.module.elementtree dependency and python 2.4 support * various code cleanups / fixes RE: [RELEASE] iPlayer - BBC Video and Music Plugin (UK only!) - Milhouse - 2014-11-22 Many thanks for all the work, however version 2.6.7 is now a *lot* slower when entering the catchup channels than 2.6.6 - for instance with a 1GHz Pi it now takes over 30 seconds before the listing is displayed after clicking the BBC One icon. The extra time is spent processing the data, with the CPU maxed out at 100% for all of this time. This is the debug log when selecting BBC One catchup with 2.6.7: Code: 04:55:40 14527.781250 T:3041038336 DEBUG: LIRC: Update - NEW at 313195:160 0 KEY_OK_UP devinput (KEY_OK_UP) It took 32 seconds to process 337 entries. Navigating into pretty much any list, for example "Antiques Roadshow (5)" or "Alex Salmond - A Rebel's Journey (1)" both take another 30+ seconds each. With 2.6.6, the same query/processing takes only 2 seconds - this is entering BBC One (catchup): Code: 05:04:06 15033.764648 T:3040964608 DEBUG: LIRC: Update - NEW at 92607:160 0 KEY_OK_UP devinput (KEY_OK_UP) It appears that a very significant XML inefficiency has been introduced with this latest version. RE: [RELEASE] iPlayer - BBC Video and Music Plugin (UK only!) - exobuzz - 2014-11-22 Yep, however I am not going to parse XML with regular expressions just because it's quicker on a slow machine. It was a ghastly pile of crap that needed fixing. There are a few problems here, partly because the thing parses the entire XML everytime (and a large xml at that), and partly because we should be using JSON rather than XML. I am working towards this. in the meantime I think a fix would be to use cElementTree which should be quicker. I'll do a test. Long term, we need a new stable fast api (or have some service running somewhere serving us up a decent api), and a lot of code refactoring so it doesn't need to keep parsing stuff everytime. Maybe some local mysqlite db. RE: [RELEASE] iPlayer - BBC Video and Music Plugin (UK only!) - Milhouse - 2014-11-22 I'm just about to profile the regex to see which expression is costing the most - will upload the results shortly. If JSON is on the horizon then I'd agree that spending any more time on XML is a waste - anyone finding 30+ second delays unacceptable may be better off sticking with 2.6.6 for now. What about caching the results, there's CommonCache - could that help? RE: [RELEASE] iPlayer - BBC Video and Music Plugin (UK only!) - exobuzz - 2014-11-22 additional caching could probably help, but first the code needs refactoring somewhat. I've been trying to pull it into shape a bit, as it's suffering from mess that has accumulated over the years. rewriting the parser to use ET was a good exercise as it now has a lot less lines of code and is readable, which will make it a lot easier when switching over to json. RE: [RELEASE] iPlayer - BBC Video and Music Plugin (UK only!) - Milhouse - 2014-11-22 Some very quick regex profiling analysis (see here for details) - this is just for entering the BBC One catchup channel: Code: Method Freq regex vs. re Avg +/- us | re (min/max/avg/total) On the face of it, regex parsing doesn't seem to be the problem (in total, it accounts for only 0.6646 seconds of processing time) so the problem is elsewhere, presumably the XML parsing but maybe some other list processing. For now I'll stick with 2.6.6, but always happy to test out any other version you may have. RE: [RELEASE] iPlayer - BBC Video and Music Plugin (UK only!) - exobuzz - 2014-11-22 you misunderstood, I replaced regexp parsing with elementtree (I wasn't saying it was the fault of the regular expressions but the replacement code). the new code is slower and doesn't use regular expressions. The speed is due to the speed of elementtree. Blame python ;-) Unfortunately cElementTree which should be multiple times faster is being problematic, so I'm not using that currently. Python is horribly slow on the pi anyway (pythons fault or just due to resources being used by xbmc ?). If you run a pi, you should also be patient - the original Xbox is far quicker for Python code. RE: [RELEASE] iPlayer - BBC Video and Music Plugin (UK only!) - Milhouse - 2014-11-22 (2014-11-22, 07:53)exobuzz Wrote: you misunderstood, I replaced regexp parsing with elementtree. the new code is slower and doesn't use regular expressions. The speed is due to the speed of elementtree. Right. Oh well. Tip to add-on developers - avoid heavy use of Elementree. (2014-11-22, 07:53)exobuzz Wrote: Python is horribly slow on the pi anyway (pythons fault or just due to resources being used by xbmc ?). If you run a pi, you should also be patient - the original Xbox is far quicker for Python code. Sure, I'm not under any illusion that the Pi is a speed demon, but when it took 2 seconds in 2.6.6 and now takes 32 seconds in 2.6.7, it's not really the fault of the hardware - ElementTree is clearly a less than ideal solution. Avoiding XML longer term is the best solution. (By the way, I'm not moaning or ungrateful - many thanks for all your efforts. I'll stick with 2.6.6 for now as it seems to work best for my needs - catchup/live TV). RE: [RELEASE] iPlayer - BBC Video and Music Plugin (UK only!) - mentat - 2014-11-22 I am getting similar results to @Milhouse on my RPi (OpenELEC 4.2.1), however, the Search function has never been faster... Approximately 2 seconds to search for "Antiques Roadshow" or "Alex Salmond" (I usually prefer to search, rather than browse). @exobuzz, I don't know if this is the right forum for this request, but I find the "iPlayer A-Z" feature on that other guy's BBC iPlayer (0.0.7) extremely useful and very fast to locate a show by name (regardless of what channel or catagory it may appear in BBC's maze). I guess I am making a feature request, but I mention it here, only because you appear to be doing some major re-tooling. I appreciate all the work you (and all the other contributors) are doing on this plugin (as my only BBC fix, here in the colonies). Thanks. RE: [RELEASE] iPlayer - BBC Video and Music Plugin (UK only!) - nickr - 2014-11-22 (2014-11-22, 08:00)mentat Wrote: (as my only BBC fix, here in the colonies). Colonies? You Canuck's don't even have the Union Jack in your flag LOL. RE: [RELEASE] iPlayer - BBC Video and Music Plugin (UK only!) - mentat - 2014-11-22 (2014-11-22, 08:14)nickr Wrote:(2014-11-22, 08:00)mentat Wrote: (as my only BBC fix, here in the colonies). Still a loyal member of the Commonwealth (and Queen Elizabeth smiles at me from every $20 bill). RE: [RELEASE] iPlayer - BBC Video and Music Plugin (UK only!) - nickr - 2014-11-22 Yep and ours too! She is getting an update next year. At least they aren't replacing her with Lorde like some idiot suggested... |