[RELEASE] NHL Gamecenter Plugin
(2015-10-06, 16:22)eracknaphobia Wrote:
(2015-10-06, 15:38)cookiemonster70 Wrote: Funny was just going to reply that it seems your install got corrupted and to uninstall and reinstall the app. As I looked into the code and the only way possible to get the extra period was due to a change in line 194 http_url = http_url.replace('condensed_5000', 'condensed_1_5000') by it being changed to http_url = http_url.replace('condensed_5000', 'condensed_1._5000') I'm sure if you had changed the quality it may have worked unless all lines from 193-198 got changed.

Either way you got it working. I just wanted to explain the reasoning behind it all.

It was actually the substring method that was causing the issue:

Here's an game url
Code:
rtmp://cdncon.fcod.llnwd.net/a277/e4/mp4:s/as3/nlds_vod/nhl/vod/2015/05/29/317/3_317_tbl_nyr_1415_h_condensed_1.mp4?eid=#####&pid=#####&gid=####&pt=1&uid=######
*where # represents a real number, I blanked them out for demonstration purposes


Old Way
playPath = game[4][37:][:-49]

New Way
last_period = game[4].rfind('.')
playPath = game[4][37:last_period]

The old way used a static number to grab the position of the last period, which worked fine for many, but if one of the parameters has an extra character, it throws it off. The new way will find the last occurrence of the "." and use that position which won't depend on the length of the parameters to stay the same length.

That makes sense. I took a stab at it without having access to be able to see what the playPath was spitting out. It always helps knowing what you initially have to work with.
Reply


Messages In This Thread
[RELEASE] NHL Gamecenter Plugin - by ellisd - 2014-10-22, 22:06
RE: [RELEASE] NHL Gamecenter Plugin - by _Ac_ - 2014-10-23, 21:29
[RELEASE] NHL Gamecenter Plugin - by HocEman - 2014-10-28, 14:10
[RELEASE] NHL Gamecenter Plugin - by HocEman - 2014-11-02, 02:26
RE: [RELEASE] NHL Gamecenter Plugin - by bino - 2014-11-02, 18:30
RE: [RELEASE] NHL Gamecenter Plugin - by bino - 2014-11-03, 02:13
RE: [RELEASE] NHL Gamecenter Plugin - by ~tbg - 2014-11-04, 03:02
RE: [RELEASE] NHL Gamecenter Plugin - by ~tbg - 2014-11-04, 03:30
RE: [RELEASE] NHL Gamecenter Plugin - by i007 - 2014-11-09, 05:13
RE: [RELEASE] NHL Gamecenter Plugin - by i007 - 2014-11-09, 19:31
RE: [RELEASE] NHL Gamecenter Plugin - by dash - 2014-11-16, 09:19
RE: [RELEASE] NHL Gamecenter Plugin - by ~tbg - 2014-12-24, 02:58
RE: [RELEASE] NHL Gamecenter Plugin - by cookiemonster70 - 2015-10-06, 20:09
RE: [RELEASE] NHL Gamecenter Plugin - by AdiW - 2015-10-08, 18:55
RE: [RELEASE] NHL Gamecenter Plugin - by Ceiu - 2015-10-09, 02:34
RE: [RELEASE] NHL Gamecenter Plugin - by AdiW - 2015-10-09, 18:09
RE: [RELEASE] NHL Gamecenter Plugin - by Ceiu - 2015-10-11, 01:32
RE: [RELEASE] NHL Gamecenter Plugin - by Ceiu - 2015-10-11, 02:01
RE: [RELEASE] NHL Gamecenter Plugin - by ~tbg - 2015-11-26, 03:13
Logout Mark Read Team Forum Stats Members Help
[RELEASE] NHL Gamecenter Plugin7