mathsgrinds / IETVNOW

Plays 12 live Irish TV stations (RTE1, RTE2, TV3, TG4, 3e, be3, RTEjr, RTE1 +1, RTE NEWS NOW, Oireachtas TV, Dail, Seanad)
Apache License 2.0
6 stars 3 forks source link

HUGE ISSUE! #17

Closed rlaphoenix closed 7 years ago

rlaphoenix commented 7 years ago

I now know why channels sometimes takes AGES to load - It seems that each time you load a channel it actually (For some reason) loads EVERYTHING in def streams() - As in, It re-gets all the stream links for no reason and THEN plays. I have no idea why :/

rlaphoenix commented 7 years ago

I guess it must be to do with the whole JSON streams() thing, We needa I guess manually do additem() for each one :/

mathsgrinds commented 7 years ago

I think it is the guide feature that takes most of the time, no? It goes much faster when the guide is off – that’s what I liked having the off/on feature. Each page needs to be scraped.

rlaphoenix commented 7 years ago

Yes that also makes it take a bit longer but thats not what im on about Lemme explain - You open IETVNOW - You let it load everything - Now you choose for example 3e you press enter and its now loading - I open fiddler and see that its re-loading the AerTV api etc to get channel links and now I see it opening entertainment.ie - It opens the last thing - And only now does it start loading 3e's stream.

It seems that EACH time you request ANYTHING from streams() even if you do for example: streams[3]['link'] == "aertv.ie" it will parse EVERTYHTING in streams() like the guide and the link for ALL index's before it starts doing the if stream == aertv :/

Get it?

rlaphoenix commented 7 years ago

If you needa try this out - Get my addon Pragma from my repo on fusion - And load 3e using Pragma - As you can see it takes ages to load because its re-fetching all the links and guides for all channels yet theres no reason too, You can get this proved by looking at fiddler while loading 3e (Or any other channel)

rlaphoenix commented 7 years ago

You might have trouble loading Pragma if you are tryna test as im currently refreshing my EPG data XML and its needed to load Pragma (But its deleted for a sec)

rlaphoenix commented 7 years ago

This is unrelated but I got this made: https://imreallyshiny.github.io/ietvnow Its a download page for IETVNOW with instructions and other cool related info 👍 You can see my other downloads herE: https://imreallyshiny.github.io/downloads

rlaphoenix commented 7 years ago

So yeah this whole Dictionary/List thing we got going on for parsing streams isnt really efficient but for IETVNOW it shouldnt really make a difference with guide off its only a couple seconds added onto load time but with guide on it takes bloody ages.

So theres not really any need to fix it but just letting you know