Kodi Community Forum
Beta Sling - 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: Beta Sling (/showthread.php?tid=351048)

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


RE: Sling - Penbrock - 2023-04-29

It is working for me today


RE: Sling addon stopped working. Error when trying to access channel list. - clones - 2023-04-29

(2023-04-29, 17:04)Joesteez Wrote: Hi all, just checking to see if this addon is still working for anyone? It stopped working yesterday for me. My account is active and I am logged in correctly. Getting an error when clicking My Channels. I think the new Freestream service was just rolled out by SLING. Thinking this may be the culprit. Maybe an addon update is required to handle? Love this addon. Thanks so much for the help!
I started getting an error last night, I deleted the app but reinstalled and keep getting an error. (it is stuck at "downloading channel info" and some channels  play and some do not. https://paste.kodi.tv/tiqahecopi


RE: Sling - Doctor Eggs - 2023-04-30

It appears something has changed on Sling's end. The URL for the channel list is no longer valid so I'm trying to figure out where it is now located so that the add-on can be updated.

Once I figure it out, I'll post something here.


RE: Sling - Doctor Eggs - 2023-04-30

I got it to work, but not everything is working in the add-on itself. I'm importing the channels/guide using IPTVMerge and using IPTV Simple to watch TV through Kodi so my desire was to just get it working in that respect.

I've updated the lib/menus/channels.py to use a different URL to get the channels and then changed the way it loops through them. Also, updated the lib/classes/channel.py so that it doesn't error out on the images.

Here is what I did to get it working.
Copy and paste the below to replace everything in the def getChannels():
Code:
def getChannels(self):
    success, region = self.auth.getRegionInfo()
    if not success:
        notificationDialog(LANGUAGE(30016))
        return

    USER_DMA = region['USER_DMA']
    USER_OFFSET = region['USER_OFFSET']
    subs = binascii.b2a_base64(str.encode(LEGACY_SUBS.replace('+', ','))).decode().strip()
    channels_url = '%s/cms/publish3/domain/channels/v4/%s/%s/%s/1.json' % \
                   (self.endPoints['cms_url'], USER_OFFSET, USER_DMA, subs)
    channels_url = self.endPoints['channels_url']
    log('\r%s' % channels_url)
    response = requests.get(channels_url, headers=HEADERS, verify=VERIFY)
    if response is not None and response.status_code == 200:
        response = response.json()
        if 'channels' in response:
            channel_names = ''
            for channel in response['channels']:
                if channel['network_affiliate_name'] is not None:
                    if 'Sling' not in channel['network_affiliate_name']:
                        if channel['channel_guid'] != '' and '"%s"' % channel['network_affiliate_name'] not in channel_names:
                            if channel['network_affiliate_name'] not in ('FOX', 'ABC', 'NBC', 'CBS'):
                                channel_names = '%s,"%s"' % (channel_names, channel['network_affiliate_name']) if channel_names != '' else '"%s"' %channel['network_affiliate_name']
                            temp_channel = Channel(channel['channel_guid'], self.endPoints, self.DB)
                            if temp_channel.GUID != '':
                                self.Channels[channel['channel_guid']] = temp_channel
            
            query = "SELECT GUID FROM Channels WHERE Protected = 1"
            try:
                cursor = self.DB.cursor()
                cursor.execute(query)
                protected = cursor.fetchall()
                for record in protected:
                    if record[0] not in self.Channels:
                        self.Channels[record[0]] = Channel(record[0], self.endPoints, self.DB)
            except sqlite3.Error as err:
                log('setSetting(): Failed retrieve protected records from DB, error => %s' % err)
            except Exception as exc:
                log('setSetting(): Failed retrieve protected records from DB, exception => %s' % exc)

And then in lib/classes/channel.py replace def processJSON() with the following:
Code:
    def processJSON(self, channel_json):
        log('Processing channel json')

        self.Name = channel_json['network_affiliate_name'] if 'network_affiliate_name' in channel_json else ''
        self.Call_Sign = channel_json['title'] if 'title' in channel_json else ''
        self.ID = int(channel_json['id']) if 'id' in channel_json else -1
        self.GUID = channel_json['channel_guid'] if 'channel_guid' in channel_json else ''
        if len(self.GUID) == 0:
            self.GUID = channel_json['guid'] if 'guid' in channel_json else ''
        if 'thumbnail' in channel_json:
            self.Thumbnail = channel_json['thumbnail']['url'] if 'url' in channel_json['thumbnail'] else ICON
        self.Qvt_Url = channel_json['qvt_url'] if 'qvt_url' in channel_json else ''
        if len(self.Qvt_Url) == 0:
            self.Qvt_Url = channel_json['qvt'] if 'qvt' in channel_json else ''
        self.Offered = bool(channel_json['offered']) if 'offered' in channel_json else True
        self.Call_Sign = channel_json['call_sign'] if 'call_sign' in channel_json else ''

        if 'metadata' in channel_json:
            metadata = channel_json['metadata']
            self.Name = metadata['channel_name'] if 'channel_name' in metadata else self.Name
            self.Call_Sign = metadata['call_sign'] if 'call_sign' in metadata else self.Call_Sign
            if 'genre' in metadata:
                genres = ''
                for genre in metadata['genre']:
                    genres = '%s, %s' % (genres, genre) if len(genres) > 0 else genre
                self.Genre = genres
            self.Poster = metadata['default_schedule_image'] if 'default_schedule_image' in metadata else self.Poster
            self.Language = metadata['language'] if 'language' in metadata else ''
        if self.Poster == FANART and 'default_schedule_image' in channel_json:
            self.Poster = channel_json['default_schedule_image'] if channel_json['default_schedule_image'] is not None else self.Poster
        if len(self.Language) == 0:
            self.Language = channel_json['language'] if 'language' in channel_json else ''

        self.Name = self.Name.strip()
        self.Genre = self.Genre.strip()
        self.Language = self.Language.strip()
        self.On_Demand = self.onDemand()

        self.saveChannel()

        return

I have both Sling Blue and Orange and I'm not sure if this will pull in a lot more channels than you are subscribed to but let me know and I'll see what I can do.


RE: Sling - Joesteez - 2023-05-01

Dude!! Thank you!! This got me back in business as well!! Same as you, I'm still not able to watch Channels via the addon but everything working in PVR via IPTV Merge so I'm happy now!! Hopefully the devs can push an addon update but for now we are good. Thanks again man, well done!


RE: Sling - clones - 2023-05-02

(2023-05-01, 01:30)Joesteez Wrote: Dude!! Thank you!! This got me back in business as well!! Same as you, I'm still not able to watch Channels via the addon but everything working in PVR via IPTV Merge so I'm happy now!! Hopefully the devs can push an addon update but for now we are good. Thanks again man, well done!
Worked great. Thank you.


RE: Sling - Smallmountains - 2023-05-02

Where do I find these two files I need to edit?  I'm running LibreElec. I don't see these files.


RE: Sling - Data_Stream - 2023-05-02

Well you download the zip on your PC, open it up, and look for the directories and files mentioned.
Open them up with a text editor, notepad is fine (Notepad++ is handy but you don't really need it) and make the described edits.

Save your changes, put that zip on a removable storage of any kind, and put it on your Kodi device. Install from there.

However, I think the publisher just updated the official build, probably best for all of us to get on that build.
I'm going to try it shortly.


RE: Sling - usphil - 2023-05-03

Sling TV seems to be experiencing a technical error. After updating the new version of Sling, the channels are almost unwatchable. On the website, channels have no sound. And now Sling TV station list has 482 channels, it's so strange. Are you having the same problem as me?


RE: Sling - usphil - 2023-05-03

After delete sling.db then scan again, I got all channels working. A lot channels added!


RE: Sling - Joesteez - 2023-05-03

Is anyone using the Leia version, version="2021.10.31.1" ? I see the matrix version was updated by the dev yesterday but not the Leia version. I was able to get the channels working via IPTV Simple client, per the fix that was mentioned above but the addon itself doesn't work for me, I get an error when clicking the Channels category. Just curious if anyone was able to get that working for the Leia version of the addon. Thanks all!


RE: Sling - Doctor Eggs - 2023-05-03

Looks like the channels URL is working again so if you go back to the old way, you should be good.

/lib/menus/channel.py
Code:
def getChannels(self):
    success, region = self.auth.getRegionInfo()
    if not success:
        notificationDialog(LANGUAGE(30016))
        return

    USER_DMA = region['USER_DMA']
    USER_OFFSET = region['USER_OFFSET']
    subs = binascii.b2a_base64(str.encode(LEGACY_SUBS.replace('+', ','))).decode().strip()
    channels_url = '%s/cms/publish3/domain/channels/v4/%s/%s/%s/1.json' % \
                   (self.endPoints['cms_url'], USER_OFFSET, USER_DMA, subs)
    log('\r%s' % channels_url)
    response = requests.get(channels_url, headers=HEADERS, verify=VERIFY)
    if response is not None and response.status_code == 200:
        response = response.json()
        if 'subscriptionpacks' in response:
            sub_packs = response['subscriptionpacks']
            for sub_pack in sub_packs:
                if 'channels' in sub_pack:
                    channel_names = ''
                    for channel in sub_pack['channels']:
                        if channel['network_affiliate_name'] is not None:
                            if 'Sling' not in channel['network_affiliate_name']:
                                if channel['channel_guid'] != '' and '"%s"' % channel['network_affiliate_name'] not in channel_names:
                                    if channel['network_affiliate_name'] not in ('FOX', 'ABC', 'NBC', 'CBS'):
                                        channel_names = '%s,"%s"' % (channel_names, channel['network_affiliate_name']) if channel_names != '' else '"%s"' %channel['network_affiliate_name']
                                    temp_channel = Channel(channel['channel_guid'], self.endPoints, self.DB)
                                    if temp_channel.GUID != '':
                                        self.Channels[channel['channel_guid']] = temp_channel
                    
                    query = "SELECT GUID FROM Channels WHERE Protected = 1"
                    try:
                        cursor = self.DB.cursor()
                        cursor.execute(query)
                        protected = cursor.fetchall()
                        for record in protected:
                            if record[0] not in self.Channels:
                                self.Channels[record[0]] = Channel(record[0], self.endPoints, self.DB)
                    except sqlite3.Error as err:
                        log('setSetting(): Failed retrieve protected records from DB, error => %s' % err)
                    except Exception as exc:
                        log('setSetting(): Failed retrieve protected records from DB, exception => %s' % exc)



RE: Sling - Smallmountains - 2023-05-11

I see IPTVSimple got updated in the last day or so.  Now no sling channels work.  I've restored the original files no no avail.  Is this  being worked on?  Should I just be patient and an update will fix this at some point?


RE: Sling - clones - 2023-05-11

(2023-05-11, 03:25)Smallmountains Wrote: I see IPTVSimple got updated in the last day or so.  Now no sling channels work.  I've restored the original files no no avail.  Is this  being worked on?  Should I just be patient and an update will fix this at some point?

It is my understanding that Sling had a big outage last night, I could not connect through Kodi or through a browser. It appears it's fixed now.


RE: Sling - Davidsilva - 2023-05-21

Thanks for this amazing addon. I seem to have hit a snag. I keep being asked to login. If I try to open anything like channels, movies tv shows etc. It asks if I already have an account. And asks for my details. I'm using libreelec on a raspberry pi 4. I can upload a debug log if required.