KodiTips Forums

!!

Sign Up For A FREE Account Today... Click the "REGISTER" button above this box!

Sign up for a free KodiTips forum account and discuss Kodi tips and tricks. Get help for your Kodi problems and join in the conversation today.

Add-ons (Covenant, Exodus) not loading TV Show Networks

Add-ons (Covenant, Exodus) not loading TV Show Networks
« on: December 26, 2017, 03:23:06 pm »
Here's a weird issue. I have tried Covenant, Exodus, Gurzil and Elysium and ALL of them have this same issue after a clean Kodi install.

You go to TV shows then networks, and it displays all the networks, then upon clicking any of them, they act like they're loading the network's shows, then nothing. I tried re-installing kodi multiple times and have the same issue, I connected to my VPN in case my ISP was doing something sketchy, and still no luck.

Has anybody seen anything like this? I noticed it on Covenant, but when all my other add-ons had the exact same issue, even after a clean install I suspect something weird is going on.

broknsymetry

  • 142
  • +6/-0
    • View Profile
Re: Add-ons (Covenant, Exodus) not loading TV Show Networks
« Reply #1 on: December 26, 2017, 08:14:55 pm »
Since many addons are affected in a similar manner I would suspect a dependency that they all use.  You might try updating URLResolver to version 4.0.16.

Re: Add-ons (Covenant, Exodus) not loading TV Show Networks
« Reply #2 on: December 27, 2017, 12:48:27 pm »
Since many addons are affected in a similar manner I would suspect a dependency that they all use.  You might try updating URLResolver to version 4.0.16.
Thank you! I will try that after work and post my results. Apparently the TVA guys have a new repo with the latest version from what I hear.

Re: Add-ons (Covenant, Exodus) not loading TV Show Networks
« Reply #3 on: December 27, 2017, 08:17:58 pm »
Updating urlresolver didn't work. This is strange

broknsymetry

  • 142
  • +6/-0
    • View Profile
Re: Add-ons (Covenant, Exodus) not loading TV Show Networks
« Reply #4 on: December 27, 2017, 08:41:46 pm »
After re-reading the OP, I understand your problem a little better.  Networks is a function of Covenant that I've not used before (looks kinda useful though).  After selecting a network the busy cursor appears but then no shows appear.  After checking the kodi log I see that Covenant is scraping the tvmaze.com website but fails.  The website is up and after entering the same url in a browser it does list that network's shows.  My best guess is that tvmaze.com has changed something in the way the page is presented and the scrapers have not yet caught up with those changes.  I'll try to check into this more, but reverse engineering the code for Covenant takes time.  Things like this will get worse over time for all addons that are no longer being updated.

Re: Add-ons (Covenant, Exodus) not loading TV Show Networks
« Reply #5 on: December 27, 2017, 09:43:21 pm »
After re-reading the OP, I understand your problem a little better.  Networks is a function of Covenant that I've not used before (looks kinda useful though).  After selecting a network the busy cursor appears but then no shows appear.  After checking the kodi log I see that Covenant is scraping the tvmaze.com website but fails.  The website is up and after entering the same url in a browser it does list that network's shows.  My best guess is that tvmaze.com has changed something in the way the page is presented and the scrapers have not yet caught up with those changes.  I'll try to check into this more, but reverse engineering the code for Covenant takes time.  Things like this will get worse over time for all addons that are no longer being updated.

Is covenant no longer being updated? If so, do you recommend any alternative?

broknsymetry

  • 142
  • +6/-0
    • View Profile
Re: Add-ons (Covenant, Exodus) not loading TV Show Networks
« Reply #6 on: December 27, 2017, 10:31:11 pm »
It is what I thought, tvmaze changed their web page.

Solution for Covenant (and others, but may not match exactly) assuming on a Windows machine:

  • open C:\Users\[your user name here]\AppData\Roaming\Kodi\addons\script.module.covenant\lib\resources\lib\indexers in Windows Explorer.
  • open the file tvshows.py using Notepad++ (or equivalent)
  • go to line 707 (or there about) or search for "def tvmaze_list"
  • somewhere below that you will see the line "items = client.parseDOM(result, 'li')"
  • change that line (or comment out and add) to "items = client.parseDOM(result, 'article', attrs = {'class': 'card grid-x'})"
  • save and exit
  • delete the file tvshows.pyo (note the "o" on the end) if it exists
  • clear the Covenant cache
  • enjoy! :)

New code should look like this:

Code: [Select]
    def tvmaze_list(self, url):
        try:
            result = client.request(url)
            result = client.parseDOM(result, 'section', attrs = {'id': 'this-seasons-shows'})

            #items = client.parseDOM(result, 'li') #changed 27/12/2017 by me.
            items = client.parseDOM(result, 'article', attrs = {'class': 'card grid-x'}) #changed 27/12/2017 by me.
            items = [client.parseDOM(i, 'a', ret='href') for i in items]
            items = [i[0] for i in items if len(i) > 0]
            items = [re.findall('/(\d+)/', i) for i in items]
            items = [i[0] for i in items if len(i) > 0]
            items = items[:50]
        except:
            return
« Last Edit: December 28, 2017, 12:40:09 pm by broknsymetry »

broknsymetry

  • 142
  • +6/-0
    • View Profile
Re: Add-ons (Covenant, Exodus) not loading TV Show Networks
« Reply #7 on: December 27, 2017, 11:41:01 pm »
Specto (and probably Exodus and others) can be modified the same way just browse the addons\plugin.video.specto folder)

You can also add networks by following the pattern in the "networks" function, get the url from tvmaze.com and find a logo somewhere.  I added Discovery Science and Hulu.

broknsymetry

  • 142
  • +6/-0
    • View Profile
Re: Add-ons (Covenant, Exodus) not loading TV Show Networks
« Reply #8 on: December 28, 2017, 04:31:55 am »
More fun and learning, change the networks function to this and list all the USA networks on tvmaze:

Code: [Select]
    def networks(self):
        try:
            for n in self.tvmaze_networks_link:
                maxp = client.request(n % self.tvmaze_country_code + '&page=1000')
                maxp = client.parseDOM(maxp, 'ul', attrs = {'class': 'pagination'})
                maxp = client.parseDOM(maxp, 'li', attrs = {'class': 'current'})
                maxp = client.parseDOM(maxp, 'a')
                maxp = int(maxp[0]) + 1
                for p in range(1, maxp):
                    network_page = client.request(n % self.tvmaze_country_code + '&page=' + str(p))
                    networks = client.parseDOM(network_page, 'div', attrs = {'class': 'card primary grid-x'})
                    for i in networks:
                        network = client.parseDOM(i, 'figure', attrs = {'class': 'image small-12 cell'})
                        title = client.parseDOM(i, 'span', attrs = {'class': 'title'})
                        title = client.parseDOM(title, 'a')
                        title = title[0].encode('utf-8')
                        url = client.parseDOM(network, 'a', ret='href')
                        url = url[0].encode('utf-8')
                        image = client.parseDOM(network, 'img', ret='src')
                        image = image[0].encode('utf-8')
         
                        self.list.append({'name': title, 'url': self.tvmaze_link + url, 'image': image, 'action': 'tvshows'})
        except:
            networks = [
            ('A&E', '/networks/29/ae', 'https://i.imgur.com/xLDfHjH.png'),
            ('ABC', '/networks/3/abc', 'https://i.imgur.com/qePLxos.png'),
            ('AMC', '/networks/20/amc', 'https://i.imgur.com/ndorJxi.png'),
            ('AT-X', '/networks/167/at-x', 'https://i.imgur.com/JshJYGN.png'),
            ('Adult Swim', '/networks/10/adult-swim', 'https://i.imgur.com/jCqbRcS.png'),
            ('Amazon', '/webchannels/3/amazon', 'https://i.imgur.com/ru9DDlL.png'),
            ('Animal Planet', '/networks/92/animal-planet', 'https://i.imgur.com/olKc4RP.png'),
            ('Audience', '/networks/31/audience-network', 'https://i.imgur.com/5Q3mo5A.png'),
            ('BBC America', '/networks/15/bbc-america', 'https://i.imgur.com/TUHDjfl.png'),
            ('BBC Four', '/networks/51/bbc-four', 'https://i.imgur.com/PNDalgw.png'),
            ('BBC One', '/networks/12/bbc-one', 'https://i.imgur.com/u8x26te.png'),
            ('BBC Three', '/webchannels/71/bbc-three', 'https://i.imgur.com/SDLeLcn.png'),
            ('BBC Two', '/networks/37/bbc-two', 'https://i.imgur.com/SKeGH1a.png'),
            ('BET', '/networks/56/bet', 'https://i.imgur.com/ZpGJ5UQ.png'),
            ('Bravo', '/networks/52/bravo', 'https://i.imgur.com/TmEO3Tn.png'),
            ('CBC', '/networks/36/cbc', 'https://i.imgur.com/unQ7WCZ.png'),
            ('CBS', '/networks/2/cbs', 'https://i.imgur.com/8OT8igR.png'),
            ('CTV', '/networks/48/ctv', 'https://i.imgur.com/qUlyVHz.png'),
            ('CW', '/networks/5/the-cw', 'https://i.imgur.com/Q8tooeM.png'),
            ('CW Seed', '/webchannels/13/cw-seed', 'https://i.imgur.com/nOdKoEy.png'),
            ('Cartoon Network', '/networks/11/cartoon-network', 'https://i.imgur.com/zmOLbbI.png'),
            ('Channel 4', '/networks/45/channel-4', 'https://i.imgur.com/6ZA9UHR.png'),
            ('Channel 5', '/networks/135/channel-5', 'https://i.imgur.com/5ubnvOh.png'),
            ('Cinemax', '/networks/19/cinemax', 'https://i.imgur.com/zWypFNI.png'),
            ('Comedy Central', '/networks/23/comedy-central', 'https://i.imgur.com/ko6XN77.png'),
            ('Crackle', '/webchannels/4/crackle', 'https://i.imgur.com/53kqZSY.png'),
            ('Discovery Channel', '/networks/66/discovery-channel', 'https://i.imgur.com/8UrXnAB.png'),
            ('Discovery ID', '/networks/89/investigation-discovery', 'https://i.imgur.com/07w7BER.png'),
            ('Discovery Science', '/networks/77/science', 'https://vignette.wikia.nocookie.net/logopedia/images/6/63/Discovery_Science_LA_2011.png/revision/latest?cb=20111129005128'),
            ('Disney Channel', '/networks/78/disney-channel', 'https://i.imgur.com/ZCgEkp6.png'),
            ('Disney XD', '/networks/25/disney-xd', 'https://i.imgur.com/PAJJoqQ.png'),
            ('E! Entertainment', '/networks/43/e', 'https://i.imgur.com/3Delf9f.png'),
            ('E4', '/networks/41/e4', 'https://i.imgur.com/frpunK8.png'),
            ('FOX', '/networks/4/fox', 'https://i.imgur.com/6vc0Iov.png'),
            ('FX', '/networks/13/fx', 'https://i.imgur.com/aQc1AIZ.png'),
            ('Freeform', '/networks/26/freeform', 'https://i.imgur.com/f9AqoHE.png'),
            ('HBO', '/networks/8/hbo', 'https://i.imgur.com/Hyu8ZGq.png'),
            ('HGTV', '/networks/192/hgtv', 'https://i.imgur.com/INnmgLT.png'),
            ('Hallmark', '/networks/50/hallmark-channel', 'https://i.imgur.com/zXS64I8.png'),
            ('History Channel', '/networks/53/history', 'https://i.imgur.com/LEMgy6n.png'),
            ('Hulu', '/webchannels/2/hulu', 'https://i.imgur.com/Vwx5QYJ.png'),
            ('ITV', '/networks/35/itv', 'https://i.imgur.com/5Hxp5eA.png'),
            ('Lifetime', '/networks/18/lifetime', 'https://i.imgur.com/tvYbhen.png'),
            ('MTV', '/networks/22/mtv', 'https://i.imgur.com/QM6DpNW.png'),
            ('NBC', '/networks/1/nbc', 'https://i.imgur.com/yPRirQZ.png'),
            ('National Geographic', '/networks/42/national-geographic-channel', 'https://i.imgur.com/XCGNKVQ.png'),
            ('Netflix', '/webchannels/1/netflix', 'https://i.imgur.com/jI5c3bw.png'),
            ('Nickelodeon', '/networks/27/nickelodeon', 'https://i.imgur.com/OUVoqYc.png'),
            ('PBS', '/networks/85/pbs', 'https://i.imgur.com/r9qeDJY.png'),
            ('Showtime', '/networks/9/showtime', 'https://i.imgur.com/SawAYkO.png'),
            ('Sky1', '/networks/63/sky-1', 'https://i.imgur.com/xbgzhPU.png'),
            ('Starz', '/networks/17/starz', 'https://i.imgur.com/Z0ep2Ru.png'),
            ('Sundance', '/networks/33/sundance-tv', 'https://i.imgur.com/qldG5p2.png'),
            ('Syfy', '/networks/16/syfy', 'https://i.imgur.com/9yCq37i.png'),
            ('TBS', '/networks/32/tbs', 'https://i.imgur.com/RVCtt4Z.png'),
            ('TLC', '/networks/80/tlc', 'https://i.imgur.com/c24MxaB.png'),
            ('TNT', '/networks/14/tnt', 'https://i.imgur.com/WnzpAGj.png'),
            ('TV Land', '/networks/57/tvland', 'https://i.imgur.com/1nIeDA5.png'),
            ('Travel Channel', '/networks/82/travel-channel', 'https://i.imgur.com/mWXv7SF.png'),
            ('TruTV', '/networks/84/trutv', 'https://i.imgur.com/HnB3zfc.png'),
            ('USA', '/networks/30/usa-network', 'https://i.imgur.com/Doccw9E.png'),
            ('VH1', '/networks/55/vh1', 'https://i.imgur.com/IUtHYzA.png'),
            ('WGN', '/networks/28/wgn-america', 'https://i.imgur.com/TL6MzgO.png')
            ]           
            for i in networks: self.list.append({'name': i[0], 'url': self.tvmaze_link + i[1], 'image': i[2], 'action': 'tvshows'})
           
        self.addDirectory(self.list)
        return self.list

And add this to the __init__ function:
Code: [Select]
self.tvmaze_country_code = '235'
self.tvmaze_networks_link = ['http://www.tvmaze.com/networks?Network[country_enum]=%s&Network[sort]=3', 'http://www.tvmaze.com/webchannels?WebChannel[country_enum]=%s&WebChannel[sort]=3']

You can change the "235" to other numbers for different countries like 112 for Japan.  Just watched an episode "Dragon Ball Super". :)

Still need to <strike>add in the "Web Channels" like Netflix, Hulu, etc.</strike> done and would be nice to add a control to select other countries.  Oh, I forgot, it won't show the images for the network logos, they are in jpg format on the tvmaze website and Covenant adds a ".png" to the end of the url. :(
« Last Edit: December 28, 2017, 05:43:18 am by broknsymetry »

Re: Add-ons (Covenant, Exodus) not loading TV Show Networks
« Reply #9 on: December 28, 2017, 07:58:41 am »
I'm using an Nvidia shield TV, but I'm going to try and find that file and see what I can do on my laptop.

Thank you so much for your help! I would have never got that far.

darkev

  • 2
  • +0/-0
    • View Profile
Re: Add-ons (Covenant, Exodus) not loading TV Show Networks
« Reply #10 on: December 28, 2017, 08:49:56 am »
I'm using Kodi and Covenant on my Fire Stick plugged into my Smart TV without the functionality of changing things as I could with my desktop or laptop PCs.  Id their an alternative method to solve this problem?

flhthemi

  • 361
  • +20/-2
  • FLHT = Harley Davidson HEMI = Dodge Challenger SRT
    • View Profile
Re: Add-ons (Covenant, Exodus) not loading TV Show Networks
« Reply #11 on: December 28, 2017, 09:03:17 am »
I'm using Kodi and Covenant on my Fire Stick plugged into my Smart TV without the functionality of changing things as I could with my desktop or laptop PCs.  Is there an alternative method to solve this problem?

Make damn sure you make a backup copy (put it someplace safe) of the file before you start tinkering. If you bugger things up you can start over with the backup copy.

If you can find the file on the firestick copy it to your PC and edit it on the PC then copy it back to the firestick.
If you have Kodi on a PC you can just edit the file then copy it to any other device you want to change.
ES File explorer has a text edit feature. If you have that installed on the firestick you can just edit the file as instructed.
If you don't have ES File explorer you can get a text editor from the Play store or Amazon's app store.

Don't forget to delete the .pyo file and clear cache on each device!


@broknsymetry

Thank you for the fix!

Do you think you could also figure out a fix for IMDB lists not showing? I'm pretty sure IMDB changed as well and now none of the Exodus clones will pull any IMDB custom lists. Also isn't pulling any of IMDB's lists either but I think people would be happy having access to their custom lists again.


EDIT: Tried this with Exodus but got no joy.


Got this in the kodi.log if it's any help..


Code: [Select]

10:13:54.016 T:7160   ERROR: EXCEPTION Thrown (PythonToCppException) : -->Python callback/script returned the following error<--
                                             - NOTE: IGNORING THIS CAN LEAD TO MEMORY LEAKS!
                                            Error Type: <type 'exceptions.IndentationError'>
                                            Error Contents: ('unexpected indent', ('C:\\Users\\flhthemi\\AppData\\Roaming\\Kodi\\addons\\plugin.video.exodus\\resources\\lib\\indexers\\tvshows.py', 668, 3, "\t\t\titems = client.parseDOM(result, 'article', attrs = {'class': 'card grid-x'})\n"))
                                            Traceback (most recent call last):
                                              File "C:\Users\flhthemi\AppData\Roaming\Kodi\addons\plugin.video.exodus\exodus.py", line 196, in <module>
                                                from resources.lib.indexers import tvshows
                                            IndentationError: ('unexpected indent', ('C:\\Users\\flhthemi\\AppData\\Roaming\\Kodi\\addons\\plugin.video.exodus\\resources\\lib\\indexers\\tvshows.py', 668, 3, "\t\t\titems = client.parseDOM(result, 'article', attrs = {'class': 'card grid-x'})\n"))
                                            -->End of Python script error report<--
« Last Edit: December 28, 2017, 10:25:15 am by flhthemi »

broknsymetry

  • 142
  • +6/-0
    • View Profile
Re: Add-ons (Covenant, Exodus) not loading TV Show Networks
« Reply #12 on: December 28, 2017, 01:07:09 pm »
Odd problem(s).  Python is picky about indentations.  Your error log is showing 3 tabs before line#668, these should be spaces.  If you are using Notepad++ go to View>>Show Symbol and make sure "Show all Characters" and "Show Indent Guide" are checked.  Tabs will show up as arrows; spaces as dots.  You can edit manually or I recommend copy&paste the code snippet above (I edited it because there was not enough of an indent on the "def" line, I hope that didn't cause the issue).  Main thing is to make sure it all lines up like it did in the original with no tabs.  I can't test with Exodus since I uninstalled it a long time ago (I still have the package though :) ), but it should work.

darkev

  • 2
  • +0/-0
    • View Profile
Re: Add-ons (Covenant, Exodus) not loading TV Show Networks
« Reply #13 on: December 28, 2017, 01:46:46 pm »
Downloaded Kodi and then Covenant (after Kodi Install) to one of my PCs.  Found and edited the file and now have networks on the PC.  However and hopefully getting things restored on the firestick will be "simple".  Like plugging the fire stick into the pc, finding the .PY file and copying the one I just fixed in place of the one on the Stick kind of simple.

One note has anyone noticed that when the menu of a TV show has the newest episode highligted with description,
 that episode is "NOT" what you see after it is loaded.  That happened with one episode of STARWARS REBELS and it just happened using the NOW WORKING networks locator on the last seen episode of Agents of Shield.

I'm using Kodi and Covenant on my Fire Stick plugged into my Smart TV without the functionality of changing things as I could with my desktop or laptop PCs.  Is there an alternative method to solve this problem?

Make damn sure you make a backup copy (put it someplace safe) of the file before you start tinkering. If you bugger things up you can start over with the backup copy.

If you can find the file on the firestick copy it to your PC and edit it on the PC then copy it back to the firestick.
If you have Kodi on a PC you can just edit the file then copy it to any other device you want to change.
ES File explorer has a text edit feature. If you have that installed on the firestick you can just edit the file as instructed.
If you don't have ES File explorer you can get a text editor from the Play store or Amazon's app store.

Don't forget to delete the .pyo file and clear cache on each device!


@broknsymetry

Thank you for the fix!

Do you think you could also figure out a fix for IMDB lists not showing? I'm pretty sure IMDB changed as well and now none of the Exodus clones will pull any IMDB custom lists. Also isn't pulling any of IMDB's lists either but I think people would be happy having access to their custom lists again.


EDIT: Tried this with Exodus but got no joy.


Got this in the kodi.log if it's any help..


Code: [Select]

10:13:54.016 T:7160   ERROR: EXCEPTION Thrown (PythonToCppException) : -->Python callback/script returned the following error<--
                                             - NOTE: IGNORING THIS CAN LEAD TO MEMORY LEAKS!
                                            Error Type: <type 'exceptions.IndentationError'>
                                            Error Contents: ('unexpected indent', ('C:\\Users\\flhthemi\\AppData\\Roaming\\Kodi\\addons\\plugin.video.exodus\\resources\\lib\\indexers\\tvshows.py', 668, 3, "\t\t\titems = client.parseDOM(result, 'article', attrs = {'class': 'card grid-x'})\n"))
                                            Traceback (most recent call last):
                                              File "C:\Users\flhthemi\AppData\Roaming\Kodi\addons\plugin.video.exodus\exodus.py", line 196, in <module>
                                                from resources.lib.indexers import tvshows
                                            IndentationError: ('unexpected indent', ('C:\\Users\\flhthemi\\AppData\\Roaming\\Kodi\\addons\\plugin.video.exodus\\resources\\lib\\indexers\\tvshows.py', 668, 3, "\t\t\titems = client.parseDOM(result, 'article', attrs = {'class': 'card grid-x'})\n"))
                                            -->End of Python script error report<--

broknsymetry

  • 142
  • +6/-0
    • View Profile
Re: Add-ons (Covenant, Exodus) not loading TV Show Networks
« Reply #14 on: December 28, 2017, 02:17:28 pm »
Just tried S.h.i.e.l.d. S05E05 and only got 2 sources, both CMOVIES.  I've noticed that CMOVIES sources have been showing the wrong episodes (usually S01E01) for some time now.  Either there is a problem with their web site or with the scraper.  I'll try to investigate after I get some sleep. :)

Re: Add-ons (Covenant, Exodus) not loading TV Show Networks
« Reply #15 on: December 28, 2017, 03:35:42 pm »
If anybody has success and is willing to upload the python script somewhere, that would be beautiful. I'm not going to have any time to even try anything until next weekend with work.

Either way, I'm looking for new add-ons since Covenant seems dead, but if I can make it work, it is my first choice.

flhthemi

  • 361
  • +20/-2
  • FLHT = Harley Davidson HEMI = Dodge Challenger SRT
    • View Profile
Re: Add-ons (Covenant, Exodus) not loading TV Show Networks
« Reply #16 on: December 29, 2017, 09:26:08 am »
Attached is a Covenant tvshows.py file WITH the modification made.

If you have to ask how to go about replacing your file with this one then just read backwards in this thread and you'll figure out where it belongs. If you can't figure it out then you probably should not be messing with it.


« Last Edit: December 29, 2017, 09:28:24 am by flhthemi »

Re: Add-ons (Covenant, Exodus) not loading TV Show Networks
« Reply #17 on: December 29, 2017, 10:12:58 am »
Attached is a Covenant tvshows.py file WITH the modification made.

If you have to ask how to go about replacing your file with this one then just read backwards in this thread and you'll figure out where it belongs. If you can't figure it out then you probably should not be messing with it.

Thank you! I actually spent all last night finding a covenant zip file and updating different scripts. That issue has been fixed and many of the sources have been fixed. It has brought new life back into Covenant, at least until I can find a replacement. Am I allowed to upload a download link to the zip? I have tested it and it works, but I'm not trying to get banned or anything...

flhthemi

  • 361
  • +20/-2
  • FLHT = Harley Davidson HEMI = Dodge Challenger SRT
    • View Profile
Re: Add-ons (Covenant, Exodus) not loading TV Show Networks
« Reply #18 on: December 29, 2017, 10:15:38 am »
Odd problem(s).  Python is picky about indentations.  Your error log is showing 3 tabs before line#668, these should be spaces.  If you are using Notepad++ go to View>>Show Symbol and make sure "Show all Characters" and "Show Indent Guide" are checked.  Tabs will show up as arrows; spaces as dots.  You can edit manually or I recommend copy&paste the code snippet above (I edited it because there was not enough of an indent on the "def" line, I hope that didn't cause the issue).  Main thing is to make sure it all lines up like it did in the original with no tabs.  I can't test with Exodus since I uninstalled it a long time ago (I still have the package though :) ), but it should work.


I followed your instructions above and YES it works for:
Fantastic - Line 712
Neptune - Line 773
Exodus - Line 667
Specto - Line 775
Covenant - Line 712


Thanks again for posting all this info!




Jodee929

  • 3
  • +0/-0
    • View Profile
Re: Add-ons (Covenant, Exodus) not loading TV Show Networks
« Reply #19 on: December 29, 2017, 06:47:53 pm »
Here's a weird issue. I have tried Covenant, Exodus, Gurzil and Elysium and ALL of them have this same issue after a clean Kodi install.

You go to TV shows then networks, and it displays all the networks, then upon clicking any of them, they act like they're loading the network's shows, then nothing. I tried re-installing kodi multiple times and have the same issue, I connected to my VPN in case my ISP was doing something sketchy, and still no luck.

Has anybody seen anything like this? I noticed it on Covenant, but when all my other add-ons had the exact same issue, even after a clean install I suspect something weird is going on.

Ok I confess to not reading every.single.word of this tread (it's long and I tried!) I had this same exact issue and the fix was really simple for me. The post below helped me...it had to do with the TMDB API key no longer working.

http://forums.koditips.com/index.php?topic=1225.0

findmystream

  • 1
  • +0/-0
    • View Profile
Re: Add-ons (Covenant, Exodus) not loading TV Show Networks
« Reply #20 on: December 30, 2017, 10:10:48 am »
Thank you for this post and it worked great but there are 3 networks not working, A&E, ABC, and AMC.  All of the others are working good now.  I am making these changes in Fantastic.  Any ideas why? The address is correct i.e. '/networks/29/ae' etc.

broknsymetry

  • 142
  • +6/-0
    • View Profile
Re: Add-ons (Covenant, Exodus) not loading TV Show Networks
« Reply #21 on: December 31, 2017, 01:29:03 am »
Just checked in Covenant and they list all the current shows airing on those networks.

flhthemi

  • 361
  • +20/-2
  • FLHT = Harley Davidson HEMI = Dodge Challenger SRT
    • View Profile
Re: Add-ons (Covenant, Exodus) not loading TV Show Networks
« Reply #22 on: December 31, 2017, 01:10:41 pm »
Thank you for this post and it worked great but there are 3 networks not working, A&E, ABC, and AMC.  All of the others are working good now.  I am making these changes in Fantastic.  Any ideas why? The address is correct i.e. '/networks/29/ae' etc.

Did you remember to clear the cache and delete the tvshows.pyo file after the change was made? I JUST installed Fantastic, set it up and then made the mod to tvshows.py and all three of those work.

Mak P

  • 3
  • +0/-0
    • View Profile
Re: Add-ons (Covenant, Exodus) not loading TV Show Networks
« Reply #23 on: January 03, 2018, 08:05:50 pm »
More fun and learning, change the networks function to this and list all the USA networks on tvmaze:

Code: [Select]
    def networks(self):
        try:
            for n in self.tvmaze_networks_link:
                maxp = client.request(n % self.tvmaze_country_code + '&page=1000')
                maxp = client.parseDOM(maxp, 'ul', attrs = {'class': 'pagination'})
                maxp = client.parseDOM(maxp, 'li', attrs = {'class': 'current'})
                maxp = client.parseDOM(maxp, 'a')
                maxp = int(maxp[0]) + 1
                for p in range(1, maxp):
                    network_page = client.request(n % self.tvmaze_country_code + '&page=' + str(p))
                    networks = client.parseDOM(network_page, 'div', attrs = {'class': 'card primary grid-x'})
                    for i in networks:
                        network = client.parseDOM(i, 'figure', attrs = {'class': 'image small-12 cell'})
                        title = client.parseDOM(i, 'span', attrs = {'class': 'title'})
                        title = client.parseDOM(title, 'a')
                        title = title[0].encode('utf-8')
                        url = client.parseDOM(network, 'a', ret='href')
                        url = url[0].encode('utf-8')
                        image = client.parseDOM(network, 'img', ret='src')
                        image = image[0].encode('utf-8')
         
                        self.list.append({'name': title, 'url': self.tvmaze_link + url, 'image': image, 'action': 'tvshows'})
        except:
            networks = [
            ('A&E', '/networks/29/ae', 'https://i.imgur.com/xLDfHjH.png'),
            ('ABC', '/networks/3/abc', 'https://i.imgur.com/qePLxos.png'),
            ('AMC', '/networks/20/amc', 'https://i.imgur.com/ndorJxi.png'),
            ('AT-X', '/networks/167/at-x', 'https://i.imgur.com/JshJYGN.png'),
            ('Adult Swim', '/networks/10/adult-swim', 'https://i.imgur.com/jCqbRcS.png'),
            ('Amazon', '/webchannels/3/amazon', 'https://i.imgur.com/ru9DDlL.png'),
            ('Animal Planet', '/networks/92/animal-planet', 'https://i.imgur.com/olKc4RP.png'),
            ('Audience', '/networks/31/audience-network', 'https://i.imgur.com/5Q3mo5A.png'),
            ('BBC America', '/networks/15/bbc-america', 'https://i.imgur.com/TUHDjfl.png'),
            ('BBC Four', '/networks/51/bbc-four', 'https://i.imgur.com/PNDalgw.png'),
            ('BBC One', '/networks/12/bbc-one', 'https://i.imgur.com/u8x26te.png'),
            ('BBC Three', '/webchannels/71/bbc-three', 'https://i.imgur.com/SDLeLcn.png'),
            ('BBC Two', '/networks/37/bbc-two', 'https://i.imgur.com/SKeGH1a.png'),
            ('BET', '/networks/56/bet', 'https://i.imgur.com/ZpGJ5UQ.png'),
            ('Bravo', '/networks/52/bravo', 'https://i.imgur.com/TmEO3Tn.png'),
            ('CBC', '/networks/36/cbc', 'https://i.imgur.com/unQ7WCZ.png'),
            ('CBS', '/networks/2/cbs', 'https://i.imgur.com/8OT8igR.png'),
            ('CTV', '/networks/48/ctv', 'https://i.imgur.com/qUlyVHz.png'),
            ('CW', '/networks/5/the-cw', 'https://i.imgur.com/Q8tooeM.png'),
            ('CW Seed', '/webchannels/13/cw-seed', 'https://i.imgur.com/nOdKoEy.png'),
            ('Cartoon Network', '/networks/11/cartoon-network', 'https://i.imgur.com/zmOLbbI.png'),
            ('Channel 4', '/networks/45/channel-4', 'https://i.imgur.com/6ZA9UHR.png'),
            ('Channel 5', '/networks/135/channel-5', 'https://i.imgur.com/5ubnvOh.png'),
            ('Cinemax', '/networks/19/cinemax', 'https://i.imgur.com/zWypFNI.png'),
            ('Comedy Central', '/networks/23/comedy-central', 'https://i.imgur.com/ko6XN77.png'),
            ('Crackle', '/webchannels/4/crackle', 'https://i.imgur.com/53kqZSY.png'),
            ('Discovery Channel', '/networks/66/discovery-channel', 'https://i.imgur.com/8UrXnAB.png'),
            ('Discovery ID', '/networks/89/investigation-discovery', 'https://i.imgur.com/07w7BER.png'),
            ('Discovery Science', '/networks/77/science', 'https://vignette.wikia.nocookie.net/logopedia/images/6/63/Discovery_Science_LA_2011.png/revision/latest?cb=20111129005128'),
            ('Disney Channel', '/networks/78/disney-channel', 'https://i.imgur.com/ZCgEkp6.png'),
            ('Disney XD', '/networks/25/disney-xd', 'https://i.imgur.com/PAJJoqQ.png'),
            ('E! Entertainment', '/networks/43/e', 'https://i.imgur.com/3Delf9f.png'),
            ('E4', '/networks/41/e4', 'https://i.imgur.com/frpunK8.png'),
            ('FOX', '/networks/4/fox', 'https://i.imgur.com/6vc0Iov.png'),
            ('FX', '/networks/13/fx', 'https://i.imgur.com/aQc1AIZ.png'),
            ('Freeform', '/networks/26/freeform', 'https://i.imgur.com/f9AqoHE.png'),
            ('HBO', '/networks/8/hbo', 'https://i.imgur.com/Hyu8ZGq.png'),
            ('HGTV', '/networks/192/hgtv', 'https://i.imgur.com/INnmgLT.png'),
            ('Hallmark', '/networks/50/hallmark-channel', 'https://i.imgur.com/zXS64I8.png'),
            ('History Channel', '/networks/53/history', 'https://i.imgur.com/LEMgy6n.png'),
            ('Hulu', '/webchannels/2/hulu', 'https://i.imgur.com/Vwx5QYJ.png'),
            ('ITV', '/networks/35/itv', 'https://i.imgur.com/5Hxp5eA.png'),
            ('Lifetime', '/networks/18/lifetime', 'https://i.imgur.com/tvYbhen.png'),
            ('MTV', '/networks/22/mtv', 'https://i.imgur.com/QM6DpNW.png'),
            ('NBC', '/networks/1/nbc', 'https://i.imgur.com/yPRirQZ.png'),
            ('National Geographic', '/networks/42/national-geographic-channel', 'https://i.imgur.com/XCGNKVQ.png'),
            ('Netflix', '/webchannels/1/netflix', 'https://i.imgur.com/jI5c3bw.png'),
            ('Nickelodeon', '/networks/27/nickelodeon', 'https://i.imgur.com/OUVoqYc.png'),
            ('PBS', '/networks/85/pbs', 'https://i.imgur.com/r9qeDJY.png'),
            ('Showtime', '/networks/9/showtime', 'https://i.imgur.com/SawAYkO.png'),
            ('Sky1', '/networks/63/sky-1', 'https://i.imgur.com/xbgzhPU.png'),
            ('Starz', '/networks/17/starz', 'https://i.imgur.com/Z0ep2Ru.png'),
            ('Sundance', '/networks/33/sundance-tv', 'https://i.imgur.com/qldG5p2.png'),
            ('Syfy', '/networks/16/syfy', 'https://i.imgur.com/9yCq37i.png'),
            ('TBS', '/networks/32/tbs', 'https://i.imgur.com/RVCtt4Z.png'),
            ('TLC', '/networks/80/tlc', 'https://i.imgur.com/c24MxaB.png'),
            ('TNT', '/networks/14/tnt', 'https://i.imgur.com/WnzpAGj.png'),
            ('TV Land', '/networks/57/tvland', 'https://i.imgur.com/1nIeDA5.png'),
            ('Travel Channel', '/networks/82/travel-channel', 'https://i.imgur.com/mWXv7SF.png'),
            ('TruTV', '/networks/84/trutv', 'https://i.imgur.com/HnB3zfc.png'),
            ('USA', '/networks/30/usa-network', 'https://i.imgur.com/Doccw9E.png'),
            ('VH1', '/networks/55/vh1', 'https://i.imgur.com/IUtHYzA.png'),
            ('WGN', '/networks/28/wgn-america', 'https://i.imgur.com/TL6MzgO.png')
            ]           
            for i in networks: self.list.append({'name': i[0], 'url': self.tvmaze_link + i[1], 'image': i[2], 'action': 'tvshows'})
           
        self.addDirectory(self.list)
        return self.list

And add this to the __init__ function:
Code: [Select]
self.tvmaze_country_code = '235'
self.tvmaze_networks_link = ['http://www.tvmaze.com/networks?Network[country_enum]=%s&Network[sort]=3', 'http://www.tvmaze.com/webchannels?WebChannel[country_enum]=%s&WebChannel[sort]=3']

You can change the "235" to other numbers for different countries like 112 for Japan.  Just watched an episode "Dragon Ball Super". :)

Still need to <strike>add in the "Web Channels" like Netflix, Hulu, etc.</strike> done and would be nice to add a control to select other countries.  Oh, I forgot, it won't show the images for the network logos, they are in jpg format on the tvmaze website and Covenant adds a ".png" to the end of the url. :(


New to the website and I appreciate this, it worked. But can you help me understand why All of the shows arent showing up under Kodi? For instance starz on tvmaze has quite a few shows listed that aren't on Kodi. It saves a lot of time having to manually search the show. I'm on the fire stick

« Last Edit: January 03, 2018, 08:18:50 pm by Mak P »

broknsymetry

  • 142
  • +6/-0
    • View Profile
Re: Add-ons (Covenant, Exodus) not loading TV Show Networks
« Reply #24 on: January 04, 2018, 02:04:51 am »
The code above gets the tvmaze.com web page for the chosen network and scrapes it for content.  The shows listed on that page is for currently airing programs under the "This Season's Shows" section.  Additionally, Covenant uses the TVDB database for meta information, so if it doesn't include a particular show it will not be displayed.  I have modified my tvshows.py file to allow one to choose country, then network and then choice of "all shows" or current shows", but the changes are more complicated than the above.  If anyone is interrested I will try to make it available.  Also, remember to save a copy of your changes in case there is an update to the addon; the update will overwrite the file.  Perhaps someone who knows python better than I do (I'm more at home with other languages) could provide a work around for the overwriting.

flhthemi

  • 361
  • +20/-2
  • FLHT = Harley Davidson HEMI = Dodge Challenger SRT
    • View Profile
Re: Add-ons (Covenant, Exodus) not loading TV Show Networks
« Reply #25 on: January 04, 2018, 09:53:36 am »
So if you are modding the tvshows.py file and the addon does get updated, aren't you better off modding the new possibly updated tvshows.py file as there might have been changes by the dev to it? Just asking to further enhance my knowledge :)


broknsymetry

  • 142
  • +6/-0
    • View Profile
Re: Add-ons (Covenant, Exodus) not loading TV Show Networks
« Reply #26 on: January 04, 2018, 07:08:46 pm »
So if you are modding the tvshows.py file and the addon does get updated, aren't you better off modding the new possibly updated tvshows.py file as there might have been changes by the dev to it? Just asking to further enhance my knowledge :)

You are absolutely correct.  However, I have created a separate tvnetworksmod.py file and a text file to append to the end of the tvshows.py file so that if it gets updated the mod file functions for just the network methods of the class will be modified at run time ("monkey patched").  This way if the original is ever updated for reasons outside of the network methods (the class also has trakt and imdb functions) the updated file will still work and all that will need to be done is to append the txt file to the end of it.  If the tvnetworksmod file needs updating then I will try to update the file at github.  This mod also list other countries' networks.  :)

https://github.com/broknsymetry/cov_network_mod
« Last Edit: January 04, 2018, 07:10:29 pm by broknsymetry »

Glenn1946

  • 2
  • +0/-0
    • View Profile
Re: Add-ons (Covenant, Exodus) not loading TV Show Networks
« Reply #27 on: January 17, 2018, 10:47:02 am »
New at this and was wondering how to mod the tvshows.py file on a android box, I have 2, one Sony and the other a Nvidia Shield TV. Any help would be greatly appreciated.

So if you are modding the tvshows.py file and the addon does get updated, aren't you better off modding the new possibly updated tvshows.py file as there might have been changes by the dev to it? Just asking to further enhance my knowledge :)

You are absolutely correct.  However, I have created a separate tvnetworksmod.py file and a text file to append to the end of the tvshows.py file so that if it gets updated the mod file functions for just the network methods of the class will be modified at run time ("monkey patched").  This way if the original is ever updated for reasons outside of the network methods (the class also has trakt and imdb functions) the updated file will still work and all that will need to be done is to append the txt file to the end of it.  If the tvnetworksmod file needs updating then I will try to update the file at github.  This mod also list other countries' networks.  :)

https://github.com/broknsymetry/cov_network_mod

jevero626

  • 1
  • +0/-0
    • View Profile
Re: Add-ons (Covenant, Exodus) not loading TV Show Networks
« Reply #28 on: January 19, 2018, 07:48:05 pm »
    It is what I thought, tvmaze changed their web page.

    Solution for Covenant (and others, but may not match exactly) assuming on a Windows machine:
    • open C:\Users\[your user name here]\AppData\Roaming\Kodi\addons\script.module.covenant\lib\resources\lib\indexers in Windows Explorer.

    I am not new to Kodi, but new to this support site.  Like many, I am experiencing this issue as well.  Network under TV shows will not load any information.  I searched and found this site to be the most comprehensive and detailed of them all.  I was able to follow the above instructions to the letter, however this only works on Windows based OS. Does anyone know where I can find it on Android and Linux devices?  I have searched for locations under [.kodi] in Android and under those folders, I can't seem to locate the tvmaze.py file.  Under Linux, I searched the whole file structure [Home] and same results, I can't find the *.py file.  Any ideas? Thanks beforehand for your support[/list]

    broknsymetry

    • 142
    • +6/-0
      • View Profile
    Re: Add-ons (Covenant, Exodus) not loading TV Show Networks
    « Reply #29 on: January 20, 2018, 12:34:58 am »
    I believe they can be found at the following locations:

    Android:  Android/data/org.xbmc.kodi/files/.kodi

    Linux:  /home/USERNAME/.kodi or enter cd ~/.kodi

    But you are looking for the wrong file, it is not tvmaze.py, it is tvshows.py