PDA

View Full Version : IPTV Stalker and iVue integration modifications



dara
08-20-2015, 01:30 AM
For those who use iVue to connect to the servers through IPTV Stalker... This minor code change will prevent IPTV Stalker from sending an invalid serial number, which would cause on-going authentication issues with the server. If you already have these issues, you need to change your linked MAC, as it is already corrupted, and make sure that "Send Serial Number" is off.


Using a simple text editor, or Notepad++, make this change in the load_channels.py module in plugin.video.stalker in your addons folder

Just put a # sign in front of the setSerialNumber(Serial)




def retriveUrl(portal_mac, url, serial, channel, tmp):

setMac(portal_mac);
# setSerialNumber(serial);

if 'matrix' in channel:
return retrieve_matrixUrl(url, channel);

else:
return retrive_defaultUrl(url, channel, tmp);

Alucard
08-21-2015, 11:44 PM
Dara, I think you are on the right track here but I don't think that is enough. This is a procedure and is called from other procedures then just this one leave a potential of still trigger setSerialNumber procedure. I think this would be a better solution as outlined below. What do you think?

def setSerialNumber(serial):
global sn, device_id, device_id2, signature;

return; <-- Add return here.

if serial == None:
return;

elif serial['custom'] == False:
sn = hashlib.md5(mac).hexdigest().upper()[13:];
device_id = hashlib.sha256(sn).hexdigest().upper();
device_id2 = hashlib.sha256(mac).hexdigest().upper();
signature = hashlib.sha256(sn + mac).hexdigest().upper();

elif serial['custom'] == True:
sn = serial['sn'];
device_id = serial['device_id'];
device_id2 = serial['device_id2'];
signature = serial['signature'];

dara
08-21-2015, 11:56 PM
I saw that, but going line by line to eliminate that call would be too difficult for the novice user. The tutorials now all say not to set the "Send Serial Number", which essentially stops all other calls to the "false" and "true", because serial is "None". In the case of iVue, the serial is "True", so it will trigger the sending of all that info, unless stopped.

Alucard
08-22-2015, 02:41 AM
yes I see what your saying, all these issues will soon be easy to fix :)

generica
08-22-2015, 06:04 PM
You guys working with a Python script ?

dara
08-22-2015, 06:12 PM
You guys working with a Python script ?

The python script is within the IPTV Staker add-on. Because the add-on was released here first, I hope the author will return to make updates for it. However, I may fork it out to make it a 'semi-official' custom version that won't require anything but a valid mac to run.

ivueguide
08-26-2015, 12:12 PM
serial%22%3A+%7B%22custom%22%3A+false%7D%2C+%22 youll see in ivue the serial is actually off in the addons.ini so ivue wont send serial command anyway?

dara
08-26-2015, 02:40 PM
serial%22%3A+%7B%22custom%22%3A+false%7D%2C+%22 youll see in ivue the serial is actually off in the addons.ini so ivue wont send serial command anyway?

I think the line sends its over as "False", but it actually needs to be a null. I put in a debug line in the IPTV Stalker to see what it sees when the play channel routine is called, and its not the same as when a channel is called internally from IPTV Stalker.

Alucard
08-26-2015, 07:27 PM
Looking at the iVue Stalker channel list it looks to me that it is sending a null and it it should be an empty string

portal={"name": "NFPS", "parental": "false", "url": "http://portal.iptvprivateserver.tv", "mac": "00:1a:00:00:00:00", "serial": null, "password": ""}
should be
portal={"name": "NFPS", "parental": "false", "url": "http://portal.iptvprivateserver.tv", "mac": "00:1a:00:00:00:00", "serial": "", "password": ""}

I am working on a fix for this.

dara
08-26-2015, 08:26 PM
I'm going to see if I can force IPTV Stalker to use the custom MAC entered in IPTV Stalker, no matter what MAC is being sent over from iVue. Alucard, or anyone that read or hack code, you are welcome to help.

Alucard
08-27-2015, 01:41 AM
dara, that is a good idea. That should be easy to do, let me look in to that.

Alucard
08-28-2015, 02:19 PM
Ok I was able to patch the Stalker addon.py to allow you to only specify the portal number you wish to use. This will also avoid sending the SR# issue as well. An example of the new iVue URL is below.

BBC ONE=plugin://plugin.video.stalker/?tmp=1&genre_name=%5B%22All%22%5D&title=BBC+ONE&cmd=ffrt2+http%3A%2F%2Flocalhost%2Fch%2F2443&portal=1&mode=play&logo_url=http%3A%2F%2Fportal.iptvprivateserver.tv% 2Fstalker_portal%2Fmisc%2Flogos%2F320%2F801.png

I am updating my tool I use for managing the channels in Kodi to have it also work for iVue. It will aid in making these changes and setting up all the links in iVue for you.

+++++++
Updated, Client will no longer use the complete portal information in the URLs but used the portal number as a reference to retrieve the portal information. This will allow you to create shortcuts and use the links without having to worry about them if you change the MAC. This update maintains 100% compatibility with all Stalker Middle Ware servers. Also will fix the Serial Number bug.

dara
08-28-2015, 02:54 PM
Thanks. I'll test it out!

Alucard
08-28-2015, 05:07 PM
Oh I forgot to mention that it will support both formats. If you want to play with the tool I can PM it to you when I am done. I keep finding stuff to add. Next is getting the channel logos for people using IP Simple client.

dara
08-28-2015, 09:27 PM
I think this code will force the use of Portal 1's MAC



if portal is None:
portal_1 = config.portalConfig('1');
portal_2 = config.portalConfig('2');
portal_3 = config.portalConfig('3');
else:
if "{" in portal[0]:
#portal = json.loads(portal[0]);
portal = config.portalConfig('1');
else:
xbmcgui.Dialog().notification(addonname, "not json", xbmcgui.NOTIFICATION_ERROR );


I tested this against a newly loaded addons.ini, without modifying the MAC or serial number, and it did call the channel through IPTV Stalker using the MAC and serial number that isn't set in Portal 1. I

dara
08-28-2015, 09:59 PM
I tested my modified IPTV Stalker on Renegades TV Guide, and it works!


I'm thinking as long as iVue is correctly sending the "cmd" and "tmp" from the addons.ini, there is no need to modify it, and just make the change to replace

portal = json.loads(portal[0]);

with

portal = config.portalConfig('1');

because the json call is not necessary. What do you think Alucard?

contentryder
08-29-2015, 12:30 AM
I did accordingly but still get authorization failed in iVue. IPTV Stalker works though...help?

Alucard
08-29-2015, 01:20 AM
Dara, Yes you could but that is assuming that everyone is using portal 1 for NFPS. If you specify the portal then other portals can be configured any way. Once my utility app is done it will take less than a minute to update iVue. It will look to see if you have the modified script to determine if it will load the full links or just the portal number change in to iVue.

dara
08-29-2015, 02:28 AM
I think it will be ok. For now, MACs work on all servers. The modified IPTV Stalker will have all three servers listed as default, with the correct urls already entered, as well as the serial number entry removed from the GUI. This way, no one has to make any substantial changes to the addons.ini, and the IPTV Stalker will be the sole location for MAC info.

generica
08-29-2015, 02:22 PM
Are you guys testing this on PC or Android box ?

I am no stranger to coding so I could learn a little on how this stuff works by doing some debugging or coding as well.

Alucard
08-29-2015, 03:30 PM
It works on both.

Alucard
08-29-2015, 03:44 PM
OK I updated the code. Unfortunately I am not sure where iVue is getting the stalker URL links from. It looks like these may be defaults from there server. So until they actually link to stalker to get there channel information the links have to be updated manually. I am just about done with my tool so I may be able to post it later today for testing.

dara
08-29-2015, 04:16 PM
I changed the topic name to generalize this thread for those who wish to discuss their modifications to integrate iVue with IPTV Stalker (1.0.18 official)

jec1
09-16-2015, 12:48 PM
Hi Alucard. I'm DEFINITELY a newbie at this. I downloaded the stalker_mac_fix file you posted and when I tried to install the add-on i got a message saying "add-on does not have the correct structure". any suggestions? i fell pray to the bad stalker file and now my live tv does not work, i get the NFPS failed to authenticate.

Thanks,
John


Ok I was able to patch the Stalker addon.py to allow you to only specify the portal number you wish to use. This will also avoid sending the SR# issue as well. An example of the new iVue URL is below.

BBC ONE=plugin://plugin.video.stalker/?tmp=1&genre_name=%5B%22All%22%5D&title=BBC+ONE&cmd=ffrt2+http%3A%2F%2Flocalhost%2Fch%2F2443&portal=1&mode=play&logo_url=http%3A%2F%2Fportal.iptvprivateserver.tv% 2Fstalker_portal%2Fmisc%2Flogos%2F320%2F801.png

I am updating my tool I use for managing the channels in Kodi to have it also work for iVue. It will aid in making these changes and setting up all the links in iVue for you.

+++++++
Updated, Client will no longer use the complete portal information in the URLs but used the portal number as a reference to retrieve the portal information. This will allow you to create shortcuts and use the links without having to worry about them if you change the MAC. This update maintains 100% compatibility with all Stalker Middle Ware servers. Also will fix the Serial Number bug.

dara
09-16-2015, 03:12 PM
Hi Alucard. I'm DEFINITELY a newbie at this. I downloaded the stalker_mac_fix file you posted and when I tried to install the add-on i got a message saying "add-on does not have the correct structure". any suggestions? i fell pray to the bad stalker file and now my live tv does not work, i get the NFPS failed to authenticate.

Thanks,
John

iVue/Prostreams no longer sends MAC and Serial Number on to IPTV Stalker with its latest addons.ini, so the modifications listed in this thread are no longer valid, unless you are intentionally avoiding using IPTV Staker to send your auth credentials on to the server, and you will then have to find an old version of the addons.ini. If you want to use iVue, you should be using the 9.0.19 modification of IPTV Stalker, which should only require your linked mac in Portal 1. See the IPTV Stalker forum for the version and instructions on how to properly configure it, and get rid of MACs that may have used the 'Send Serial Number' setting.