kodi-pvr / pvr.stalker

A PVR Client that connects Kodi to Stalker Middleware

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Support for matrix on stalker?

cchalk opened this issue · comments

Hi, is it possible for pvr.stalker to support matrix channels?

These seem to be some kind of playlist send by the stalker server using matrix.php?

DMessageQueue(player)::Put MSGQ_NOT_INITIALIZED
23:43:12 T:140439944402688  NOTICE: Thread DVDPlayer start, auto delete: false
23:43:12 T:140439944402688  NOTICE: Creating InputStream
23:43:12 T:140439944402688   ERROR: Problem accessing the DNS. (addr: matrix)
23:43:12 T:140439944402688   ERROR: CDVDInputStreamPVRManager::Open - error opening [rtmp://matrix/17]
23:43:12 T:140439944402688   ERROR: CDVDPlayer::OpenInputStream - error opening [pvr://channels/tv/All channels/pvr.stalker_1614180638.pvr]
23:43:12 T:140439944402688  NOTICE: CDVDPlayer::OnExit()
23:43:12 T:140441834076160  NOTICE: CDVDPlayer::CloseFile()
23:43:12 T:140441834076160  NOTICE: DVDPlayer: waiting for threads to exit
23:43:12 T:140441834076160  NOTICE: DVDPlayer: finished waiting
23:43:12 T:140441834076160  NOTICE: CDVDPlayer::CloseFile()
23:43:12 T:140441834076160  NOTICE: DVDPlayer: waiting for threads to exit
23:43:12 T:140441834076160  NOTICE: DVDPlayer: finished waiting

This is using a paid IPTV provider. Using the plugin.video.stalker plugin I am able to play these channels.

plugin.video.stalker has the following in their load_channels.py:

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);

and

def retrieve_matrixUrl(url, channel):

    channel = channel.split('/');
    channel = channel[len(channel) -1];

    url += '/stalker_portal/server/api/matrix.php?channel=' + channel + '&mac=' + mac;

    # RETRIEVE THE 1 EXTM3U
    request = urllib2.Request(url)
    response  = urllib2.urlopen(request);
    data = response.read().decode("utf-8");

    _s1 = data.split(' ');  
    data = _s1[0];
    if len(_s1)>1:
        data = _s1[len(_s1) -1];

    return data;

See load_channels.py lines 524-533 and lines 588-605 here.

Thanks.

I'll try to implementing this.

I have no way to test that this'll work. Can you test it? Or provide a means to do so?

Hi,

I used your patches to patch my version of pvr.stalker for 15.2 and I'm glad to report that it works with my provider now!

Thanks a lot.

Glad to hear it works.