If you have not already, we suggest setting your Plex username to something else rather than email which is displayed on your posts in forum. You can change the username at https://app.plex.tv/desktop#!/account
Welcome to our forums! Please take a few moments to read through our Community Guidelines (also conveniently linked in the header at the top of each page). There, you'll find guidelines on conduct, tips on getting the help you may be searching for, and more!

[REL] HGTV Canada

mikedm139mikedm139 Plugin DeveloperPosts: 3,022Members, Plex Pass, Plex Ninja Plex Ninja
edited October 11 in Plex Channel Plugins
Here's plugin for all your favourite Home & Garden shows on HGTV.ca

Download: Now available in the "Channel Directory"

If you are having trouble with one or more channels, check here first.
If you are asked to provide logs, which you will be if you are having plugin problems, the help center has details on where to find them.
***************************************************************************************************************************************
Check out unofficial channels in the
UnSupported AppStore
Follow my efforts on Github and Twitter
Donate

«1345678

Comments

  • mikedm139mikedm139 Plugin Developer Posts: 3,022Members, Plex Pass, Plex Ninja Plex Ninja
    New version posted. If you're not having trouble with the old version don't worry about it.

    If you are having trouble with one or more channels, check here first.
    If you are asked to provide logs, which you will be if you are having plugin problems, the help center has details on where to find them.
    ***************************************************************************************************************************************
    Check out unofficial channels in the
    UnSupported AppStore
    Follow my efforts on Github and Twitter
    Donate

  • GerkGerk Posts: 1,052Members, Plex Pass Plex Pass
    mikedm139 wrote:

    New version posted. If you're not having trouble with the old version don't worry about it.


    Hi Mike

    It seems that none of the new show releases are showing up ... not sure if it's an issue with the plugin or if they have changed something on their end of things, but there's quite a few shows that are up on their website that are not showing up in the plugin any longer. For example Canada's handyman Challenge only shows one episode, but their site has 3 episodes posted. There are other ongoing shows that have the same thing going on ... it seems like everything froze in time right around the same time you posted about this new plugin version. I've tried both the older one and the newest one and am seeing the same things.

    Is this a known thing? Did they change video providers or something similar around that time?
  • mikedm139mikedm139 Plugin Developer Posts: 3,022Members, Plex Pass, Plex Ninja Plex Ninja
    I'll have to take a look. That seems odd. I'll add it to my todo list but I can't offer any ETA at this point.

    If you are having trouble with one or more channels, check here first.
    If you are asked to provide logs, which you will be if you are having plugin problems, the help center has details on where to find them.
    ***************************************************************************************************************************************
    Check out unofficial channels in the
    UnSupported AppStore
    Follow my efforts on Github and Twitter
    Donate

  • GerkGerk Posts: 1,052Members, Plex Pass Plex Pass
    Thanks! If you want me to test anything at any point just ping me.
  • GerkGerk Posts: 1,052Members, Plex Pass Plex Pass
    I think I figured out what they have done, just not how to properly resolve it. They've split a whole bunch of shows out of the "Full Episodes" category. For example if you go to their page for video ( http://hgtv.ca/video/ ) and click on the Sarah Richardson link it has all of her shows (lots of full episodes) ... but then if you look in the "full episodes" area none of her shows are listed any longer. I think that a lot of these shows are also missing the hasReleases tag (they say false even though there are indeed full episodes available).

    Could this also have to do with their injected commercials they are doing on their site with these I wonder? I spent a couple hours hacking on it tonight but couldn't come up with anything helpful -- but I did manage to use the API to pull almost all of the listings including full paths to the videos that don't have the hasReleases tag set ...
  • GerkGerk Posts: 1,052Members, Plex Pass Plex Pass
    edited February 2012
    I have all the newest shows working again now. It seems like the bitrate limiter was causing the issue (some of the newer files seem to not have this attribute set properly). I changed the FEEDS_LIST to this and I now get all the content (I removed the bitrate limiters query options):

    FEEDS_LIST    = "http://feeds.theplatform.com/ps/JSON/PortalService/2.2/getReleaseList?PID=%s&startIndex=1&endIndex=500&query=categoryIDs|%s&sortField=airdate&sortDescending=true&field=airdate&field=author&field=description&field=length&field=PID&field=thumbnailURL&field=title&contentCustomField=title"
    


    There's still something funky going on though, there are lots and lots of shows that work on the site but that don't work through theplatform API when listing things. Still scratching my head here a bit ... the problem is that on the hgtv site it looks like they are calling all of the shows specifically by their ID to get things like the list of all Sarah Richardson shows ... but they aren't advertised or listed properly when using the methods used in this plugin. If I manually list out a show (with a dummy plugin framework) it will both list and play fine through theplatform -- but the getCategoryList doesn't advertise them so aside from manually coding in a boatload of show ID numbers (which could presumably change) I'm not sure how else we could go about getting these types of listings dynamically.

    At least this is forward progress! The current shows being posted all now show up with the above modification.
  • GerkGerk Posts: 1,052Members, Plex Pass Plex Pass
    Ok one more addition here, feel free to use it (or not) in the plugin. It might not be what everyone is looking for but I'm reasonably happy with what it gives me -- mainly being a LOT more shows.

    I've added SHOW_CATS and the function wantedCats to this, as well as a couple of tweaks to accommodate their usage. Also included was my earlier tweak that removed the bitrate restriction from the query for show listings.

    There are a few shorts and the like (non full-episodes) that sneak through, and there is at least one show that comes up with some dupes in the seasons list -- but I think that has a lot to do with the fact that they have some bad data in their setup and the show is listed four times in total -- once as Design Inc and once as Design Inc. (note the trailing period).

    Not perfect but makes me and the wife much happier campers. Here is the __init__.py file contents:

    import re, string, datetime, operator
    
    ####################################################################################################
    
    VIDEO_PREFIX = "/video/hgtv.ca"
    
    NAME = L('Title')
    
    ART             = 'art-default.jpg'
    ICON            = 'icon-default.png'
    
    HGTV_PARAMS         = ["HmHUZlCuIXO_ymAAPiwCpTCNZ3iIF1EG", "z/HGTV%20Player%20-%20Video%20Center"]
    
    FEED_LIST    = "http://feeds.theplatform.com/ps/JSON/PortalService/2.2/getCategoryList?PID=%s&startIndex=1&endIndex=500&query=hasReleases&query=CustomText|PlayerTag|%s&field=airdate&field=fullTitle&field=author&field=description&field=PID&field=thumbnailURL&field=title&contentCustomField=title&field=ID&field=parent"
    
    FEEDS_LIST    = "http://feeds.theplatform.com/ps/JSON/PortalService/2.2/getReleaseList?PID=%s&startIndex=1&endIndex=500&query=categoryIDs|%s&sortField=airdate&sortDescending=true&field=airdate&field=author&field=description&field=length&field=PID&field=thumbnailURL&field=title&contentCustomField=title"
    
    DIRECT_FEED = "http://release.theplatform.com/content.select?format=SMIL&pid=%s&UserName=Unknown&Embedded=True&TrackBrowser=True&Tracking=True&TrackLocation=True"
    
    SHOW_CATS = ["Full Episodes","Sarah Richardson","Mike Holmes","Peter Fallico","Sam Pynn","Colin and Justin","Classics"]
    
    ####################################################################################################
    
    def Start():
        Plugin.AddPrefixHandler(VIDEO_PREFIX, MainMenu, L('VideoTitle'), ICON, ART)
    
        Plugin.AddViewGroup("InfoList", viewMode="InfoList", mediaType="items")
        Plugin.AddViewGroup("List", viewMode="List", mediaType="items")
    
        MediaContainer.art = R(ART)
        MediaContainer.title1 = NAME
        DirectoryItem.thumb = R(ICON)
    
    
    ####################################################################################################
    def MainMenu():
        dir = MediaContainer(viewGroup="List")
        shows_with_seasons = {}
        shows_without_seasons = {}
    
        network = HGTV_PARAMS
        
        content = JSON.ObjectFromURL(FEED_LIST % (network[0], network[1]))
        for item in content['items']:
            if wantedCats(item['parent']):
                title = item['title']
                id = item['ID']
                if re.search("Season", title):
                    show, season = title.split("Season")
                    show = show.rstrip().split(":")[0].rstrip()
                    if not(show in shows_with_seasons):
                        shows_with_seasons[show] = ""
                        dir.Append(Function(DirectoryItem(SeasonsPage, show), network=network))
                else:
                    if not(title in shows_without_seasons):
                        shows_without_seasons[title] = []
                    shows_without_seasons[title].append(Function(DirectoryItem(VideosPage, title), pid=network[0], id=id))
    
        for show in shows_without_seasons:
            if not(show in shows_with_seasons) and len([added_show for added_show in shows_with_seasons if show in added_show or added_show in show]) == 0:
                for item in shows_without_seasons[show]:
                    dir.Append(item)
    
        dir.Sort('title')
        
        return dir
        
    ####################################################################################################
    def VideoPlayer(sender, pid, duration):
    
        videosmil = HTTP.Request(DIRECT_FEED % pid).content
        player = videosmil.split("ref src")
        player = player[2].split('"')
        #Log(player)
        if ".mp4" in player[1]:
            player = player[1].replace(".mp4", "")
            try:
                clip = player.split(";")
                clip = "mp4:" + clip[4]
            except:
                clip = player.split("/video/")
                player = player.split("/video/")[0]
                clip = "mp4:/video/" + clip[-1]
        else:
            player = player[1].replace(".flv", "")
            try:
                clip = player.split(";")
                clip = clip[4]
            except:
                clip = player.split("/video/")
                player = player.split("/video/")[0]
                clip = "/video/" + clip[-1]
    
        #Log(player)
        #Log(clip)
        return Redirect(RTMPVideoItem(player, clip))
        
    ####################################################################################################
    
    def VideosPage(sender, pid, id):
    
        dir = MediaContainer(title2=sender.itemTitle, viewGroup="InfoList", art=sender.art)
        pageUrl = FEEDS_LIST % (pid, id)
        feeds = JSON.ObjectFromURL(pageUrl)
        Log(feeds)
    
        for item in feeds['items']:
            title = item['title']
            pid = item['PID']
            summary =  item['description'].replace('In Full:', '')
            duration = item['length']
            thumb = item['thumbnailURL']
            airdate = int(item['airdate'])/1000
            subtitle = 'Originally Aired: ' + datetime.datetime.fromtimestamp(airdate).strftime('%a %b %d, %Y')
            dir.Append(Function(VideoItem(VideoPlayer, title=title, subtitle=subtitle, summary=summary, thumb=thumb, duration=duration), pid=pid, duration=duration))
        
        dir.Sort('title')
        
        return dir
        
    ####################################################################################################
    
    def SeasonsPage(sender, network):
        dir = MediaContainer(title2=sender.itemTitle, viewGroup="List", art=sender.art)
        content = JSON.ObjectFromURL(FEED_LIST % (network[0], network[1]))
        for item in content['items']:
            if wantedCats(item['parent']) and sender.itemTitle in item['title']:
                title = item['title'].split(sender.itemTitle)[-1].split(":")[-1].lstrip()
                id = item['ID']
                #thumb = item['thumbnailURL']
                dir.Append(Function(DirectoryItem(VideosPage, title, thumb=sender.thumb), pid=network[0], id=id))
        dir.Sort('title')
        return dir
                
    ####################################################################################################
    
    def wantedCats(parent):
    	for show in SHOW_CATS:
    		if show in parent:
    			return 1		
    	return 0
    
    ####################################################################################################
    
  • mikedm139mikedm139 Plugin Developer Posts: 3,022Members, Plex Pass, Plex Ninja Plex Ninja
    edited February 2012
    Gerk wrote:

    Ok one more addition here, feel free to use it (or not) in the plugin. It might not be what everyone is looking for but I'm reasonably happy with what it gives me -- mainly being a LOT more shows.

    I've added SHOW_CATS and the function wantedCats to this, as well as a couple of tweaks to accommodate their usage. Also included was my earlier tweak that removed the bitrate restriction from the query for show listings.

    There are a few shorts and the like (non full-episodes) that sneak through, and there is at least one show that comes up with some dupes in the seasons list -- but I think that has a lot to do with the fact that they have some bad data in their setup and the show is listed four times in total -- once as Design Inc and once as Design Inc. (note the trailing period).

    Not perfect but makes me and the wife much happier campers. Here is the __init__.py file contents:

    <snip code>


    Thanks for taking the initiative to dig in and fix this yourself. Sorry I wasn't any help. I'll add your changes to the official version and request an update in the Channel Directory.

    If you are having trouble with one or more channels, check here first.
    If you are asked to provide logs, which you will be if you are having plugin problems, the help center has details on where to find them.
    ***************************************************************************************************************************************
    Check out unofficial channels in the
    UnSupported AppStore
    Follow my efforts on Github and Twitter
    Donate

  • GerkGerk Posts: 1,052Members, Plex Pass Plex Pass
    No worries, glad I could help. I didn't realize this was submitted to the main channel directory either.

    There's one additional thing I realized I added but didn't complete that doesn't need to be there (but doesn't hurt anything left behind aside from some clutter). That is the addition of passing duration to the function that splits the url and the clip. I was trying to figure out how to pass the duration to the RTMP player but nothing I did seemed to work ... maybe because it's a redirect? I'm just starting to wrap my head around the basics of the plex plugins ...
  • mikedm139mikedm139 Plugin Developer Posts: 3,022Members, Plex Pass, Plex Ninja Plex Ninja
    Gerk wrote:

    No worries, glad I could help. I didn't realize this was submitted to the main channel directory either.

    There's one additional thing I realized I added but didn't complete that doesn't need to be there (but doesn't hurt anything left behind aside from some clutter). That is the addition of passing duration to the function that splits the url and the clip. I was trying to figure out how to pass the duration to the RTMP player but nothing I did seemed to work ... maybe because it's a redirect? I'm just starting to wrap my head around the basics of the plex plugins ...


    Ah, right. No big deal. I don't believe the RTMP player takes a duration argument. Perhaps it will when PMS eventually supports RTMP directly rather than via webkit. No ETA on that development yet, as far as I'm aware. THis works well enough in most cases for the time being :)

    If you are having trouble with one or more channels, check here first.
    If you are asked to provide logs, which you will be if you are having plugin problems, the help center has details on where to find them.
    ***************************************************************************************************************************************
    Check out unofficial channels in the
    UnSupported AppStore
    Follow my efforts on Github and Twitter
    Donate

  • GerkGerk Posts: 1,052Members, Plex Pass Plex Pass
    I just sent you a pull request on github for a small tweak Mike, I finally got that end of things figured out. Hope you don't mind me sending along this stuff now and then ;)
  • mikedm139mikedm139 Plugin Developer Posts: 3,022Members, Plex Pass, Plex Ninja Plex Ninja
    Gerk wrote:

    I just sent you a pull request on github for a small tweak Mike, I finally got that end of things figured out. Hope you don't mind me sending along this stuff now and then ;)


    I merged your pull request and forwarded it to the Official Plex repo. The change should auto-update via the Channel Directory soon. Thanks for the input. If you're interested in getting more involved in other plugins let me know. There's always a need for more people able to find their way around a python file.

    If you are having trouble with one or more channels, check here first.
    If you are asked to provide logs, which you will be if you are having plugin problems, the help center has details on where to find them.
    ***************************************************************************************************************************************
    Check out unofficial channels in the
    UnSupported AppStore
    Follow my efforts on Github and Twitter
    Donate

  • GerkGerk Posts: 1,052Members, Plex Pass Plex Pass
    Thanks Mike. I have the interest but not sure I have the time, slowly but surely I'm starting to grock things a bit more and there may come a time when I start asking you all for help on other plugins :)
  • jkeirsteadjkeirstead Posts: 22Members
    Gerk wrote:

    Thanks Mike. I have the interest but not sure I have the time, slowly but surely I'm starting to grock things a bit more and there may come a time when I start asking you all for help on other plugins :)


    Just thought I would drop you guys a note that the plugin is currently not working.. here is a snippit from the log, I am going to try to trace down the issue

    2012-05-01 18:58:22,247 (1298) :  DEBUG (core:324) - Response: 404
    2012-05-01 18:58:24,704 (990) :  DEBUG (core:324) - Handling request GET /video/hgtvcanada/:/function/SeasonsPage?function_args=Y2VyZWFsMQo0CmRpY3QKbGlzdApkaWN0CkZyYW1ld29yay5vYmplY3RzLkl0ZW1JbmZvUmVjb3JkCjIKcjEKczcKbmV0d29ya3IzCnM2CnNlbmRlcjIKczMyCkhtSFVabEN1SVhPX3ltQUFQaXdDcFRDTlozaUlGMUVHczM2CnovSEdUViUyMFBsYXllciUyMC0lMjBWaWRlbyUyMENlbnRlcjUKdTkKRGVjayBXYXJzczkKaXRlbVRpdGxlczcKSEdUVi5jYXM2CnRpdGxlMXM0Ck5vbmVzNgp0aXRsZTJzNTgKL3ZpZGVvL2hndHZjYW5hZGEvOi9yZXNvdXJjZXMvYXJ0LWRlZmF1bHQuanBnP3Q9MTMzNTkwODA5N3MzCmFydHM1OQovdmlkZW8vaGd0dmNhbmFkYS86L3Jlc291cmNlcy9pY29uLWRlZmF1bHQucG5nP3Q9MTMzNTkwODA5N3M1CnRodW1icjIKcjAK
    2012-05-01 18:58:24,707 (990) :  DEBUG (core:324) - Calling function 'SeasonsPage'
    2012-05-01 18:58:24,727 (990) :  DEBUG (core:324) - Fetching 'http://feeds.theplatform.com/ps/JSON/PortalService/2.2/getCategoryList?PID=HmHUZlCuIXO_ymAAPiwCpTCNZ3iIF1EG&amp;startIndex=1&amp;endIndex=500&amp;query=hasReleases&amp;query=CustomText|PlayerTag|z/HGTV%20Player%20-%20Video%20Center&amp;field=airdate&amp;field=fullTitle&amp;field=author&amp;field=description&amp;field=PID&amp;field=thumbnailURL&amp;field=title&amp;contentCustomField=title&amp;field=ID&amp;field=parent' from the HTTP cache
    2012-05-01 18:58:24,842 (990) :  DEBUG (core:324) - Response: 200
    2012-05-01 18:58:25,749 (f80) :  DEBUG (core:324) - Handling request GET /video/hgtvcanada/:/function/VideosPage?function_args=Y2VyZWFsMQozCmRpY3QKZGljdApGcmFtZXdvcmsub2JqZWN0cy5JdGVtSW5mb1JlY29yZAozCnMzMgpIbUhVWmxDdUlYT195bUFBUGl3Q3BUQ05aM2lJRjFFR3MzCnBpZGwyMTk0NTcwMjQzTApzMgppZHIyCnM2CnNlbmRlcjUKdTgKU2Vhc29uIDJzOQppdGVtVGl0bGVzNwpIR1RWLmNhczYKdGl0bGUxczkKRGVjayBXYXJzczYKdGl0bGUyczU4Ci92aWRlby9oZ3R2Y2FuYWRhLzovcmVzb3VyY2VzL2FydC1kZWZhdWx0LmpwZz90PTEzMzU5MDgwOTdzMwphcnRzNTkKL3ZpZGVvL2hndHZjYW5hZGEvOi9yZXNvdXJjZXMvaWNvbi1kZWZhdWx0LnBuZz90PTEzMzU5MDgwOTdzNQp0aHVtYnIxCnIwCg__
    2012-05-01 18:58:25,750 (f80) :  DEBUG (core:324) - Calling function 'VideosPage'
    2012-05-01 18:58:25,767 (f80) :  DEBUG (core:324) - Requesting 'http://feeds.theplatform.com/ps/JSON/PortalService/2.2/getReleaseList?PID=HmHUZlCuIXO_ymAAPiwCpTCNZ3iIF1EG&amp;startIndex=1&amp;endIndex=500&amp;query=categoryIDs|2194570243&amp;sortField=airdate&amp;sortDescending=true&amp;field=airdate&amp;field=author&amp;field=description&amp;field=length&amp;field=PID&amp;field=thumbnailURL&amp;field=title&amp;contentCustomField=title'
    2012-05-01 18:58:26,286 (f80) :  DEBUG (core:324) - Response: 200
    2012-05-01 18:58:27,519 (a84) :  DEBUG (core:324) - Handling request GET /video/hgtvcanada/:/function/VideoPlayer?function_args=Y2VyZWFsMQozCmRpY3QKZGljdApGcmFtZXdvcmsub2JqZWN0cy5JdGVtSW5mb1JlY29yZAoyCnUzMgpOdTBycjMzWXFuTm1BTUNPQUpuX3A1WElnZ3FoaHRSUXMzCnBpZHIyCnM2CnNlbmRlcjUKdTI3ClRoZSBVbHRpbWF0ZSBGcmVlc3R5bGUgRGVja3M5Cml0ZW1UaXRsZXM3CkhHVFYuY2FzNgp0aXRsZTFzOApTZWFzb24gMnM2CnRpdGxlMnM1OAovdmlkZW8vaGd0dmNhbmFkYS86L3Jlc291cmNlcy9hcnQtZGVmYXVsdC5qcGc%40dD0xMzM1OTA4MDk3czMKYXJ0czE1MgpodHRwOi8vYTEyMy5nLmFrYW1haS5uZXQvZi8xMjMvNjg4MTEvMWQvYnJvYWRjYXN0ZW50LmRvd25sb2FkLmFrYW1haS5jb20vNjg5NjEvQ2Fud2VzdF9Ccm9hZGNhc3RfRW50ZXJ0YWlubWVudC9IR1RWX0RlY2tXYXJzX0UyMTFfMjIweDEzMF8yMjE2ODAxMzg4LmpwZ3M1CnRodW1icjEKcjAK
    2012-05-01 18:58:27,520 (a84) :  DEBUG (core:324) - Calling function 'VideoPlayer'
    2012-05-01 18:58:27,539 (a84) :  DEBUG (core:324) - Requesting 'http://release.theplatform.com/content.select?format=SMIL&amp;pid=Nu0rr33YqnNmAMCOAJn_p5XIggqhhtRQ&amp;UserName=Unknown&amp;Embedded=True&amp;TrackBrowser=True&amp;Tracking=True&amp;TrackLocation=True'
    2012-05-01 18:58:27,901 (a84) :  CRITICAL (core:324) - Exception when calling function 'VideoPlayer' (most recent call last):
      File "C:&#092;Users&#092;media&#092;AppData&#092;Local&#092;Plex Media Server&#092;Plug-ins&#092;Framework.bundle&#092;Contents&#092;Resources&#092;Versions&#092;2&#092;Python&#092;Framework&#092;code.py", line 698, in call_named_function
        result = f(*args, **kwargs)
      File "C:&#092;Users&#092;media&#092;AppData&#092;Local&#092;Plex Media Server&#092;Plug-ins&#092;HGTV.ca.bundle&#092;Contents&#092;Code&#092;__init__.py", line 71, in VideoPlayer
        player = player[2].split('"')
      File "C:&#092;Users&#092;media&#092;AppData&#092;Local&#092;Plex Media Server&#092;Plug-ins&#092;Framework.bundle&#092;Contents&#092;Resources&#092;Versions&#092;2&#092;Python&#092;Framework&#092;bases.py", line 183, in &lt;lambda&gt;
        _getitem_ = lambda x, y: x.__getitem__(y),
    IndexError: list index out of range
    
    2012-05-01 18:58:27,913 (a84) :  DEBUG (core:324) - Response: 404
    2012-05-01 18:58:30,174 (11c4) :  DEBUG (core:324) - Handling request GET /video/hgtvcanada/:/function/VideoPlayer?function_args=Y2VyZWFsMQozCmRpY3QKZGljdApGcmFtZXdvcmsub2JqZWN0cy5JdGVtSW5mb1JlY29yZAoyCnUzMgp1dmZabmtGOVpvclVZUlRsTVZGbjZBRzBjY3ZsNk5yR3MzCnBpZHIyCnM2CnNlbmRlcjUKdTI1ClRoZSBVbHRpbWF0ZSBIb3QgVHViIERlY2tzOQppdGVtVGl0bGVzNwpIR1RWLmNhczYKdGl0bGUxczgKU2Vhc29uIDJzNgp0aXRsZTJzNTgKL3ZpZGVvL2hndHZjYW5hZGEvOi9yZXNvdXJjZXMvYXJ0LWRlZmF1bHQuanBnP3Q9MTMzNTkwODA5N3MzCmFydHMxNTIKaHR0cDovL2ExMjMuZy5ha2FtYWkubmV0L2YvMTIzLzY4ODExLzFkL2Jyb2FkY2FzdGVudC5kb3dubG9hZC5ha2FtYWkuY29tLzY4OTYxL0Nhbndlc3RfQnJvYWRjYXN0X0VudGVydGFpbm1lbnQvSEdUVl9EZWNrV2Fyc19FMjA4XzIyMHgxMzBfMjIwNjY5MTEwNC5qcGdzNQp0aHVtYnIxCnIwCg__
    2012-05-01 18:58:30,177 (11c4) :  DEBUG (core:324) - Calling function 'VideoPlayer'
    2012-05-01 18:58:30,194 (11c4) :  DEBUG (core:324) - Requesting 'http://release.theplatform.com/content.select?format=SMIL&amp;pid=uvfZnkF9ZorUYRTlMVFn6AG0ccvl6NrG&amp;UserName=Unknown&amp;Embedded=True&amp;TrackBrowser=True&amp;Tracking=True&amp;TrackLocation=True'
    2012-05-01 18:58:30,456 (11c4) :  CRITICAL (core:324) - Exception when calling function 'VideoPlayer' (most recent call last):
      File "C:&#092;Users&#092;media&#092;AppData&#092;Local&#092;Plex Media Server&#092;Plug-ins&#092;Framework.bundle&#092;Contents&#092;Resources&#092;Versions&#092;2&#092;Python&#092;Framework&#092;code.py", line 698, in call_named_function
        result = f(*args, **kwargs)
      File "C:&#092;Users&#092;media&#092;AppData&#092;Local&#092;Plex Media Server&#092;Plug-ins&#092;HGTV.ca.bundle&#092;Contents&#092;Code&#092;__init__.py", line 71, in VideoPlayer
        player = player[2].split('"')
      File "C:&#092;Users&#092;media&#092;AppData&#092;Local&#092;Plex Media Server&#092;Plug-ins&#092;Framework.bundle&#092;Contents&#092;Resources&#092;Versions&#092;2&#092;Python&#092;Framework&#092;bases.py", line 183, in &lt;lambda&gt;
        _getitem_ = lambda x, y: x.__getitem__(y),
    IndexError: list index out of range
    
    2012-05-01 18:58:30,467 (11c4) :  DEBUG (core:324) - Response: 404
    
  • mikedm139mikedm139 Plugin Developer Posts: 3,022Members, Plex Pass, Plex Ninja Plex Ninja
    jkeirstead wrote:

    Just thought I would drop you guys a note that the plugin is currently not working.. here is a snippit from the log, I am going to try to trace down the issue

    <snip>


    Thanks for the heads-up. If you manage to figure out the issue, let me know and I'll add the fix to the official version. Otherwise, I'll have a look when I get a chance.

    If you are having trouble with one or more channels, check here first.
    If you are asked to provide logs, which you will be if you are having plugin problems, the help center has details on where to find them.
    ***************************************************************************************************************************************
    Check out unofficial channels in the
    UnSupported AppStore
    Follow my efforts on Github and Twitter
    Donate

  • jkeirsteadjkeirstead Posts: 22Members
    mikedm139 wrote:

    Thanks for the heads-up. If you manage to figure out the issue, let me know and I'll add the fix to the official version. Otherwise, I'll have a look when I get a chance.


    I added some extra debugging code and something weird is going on. Check out the SMIL file that ends up being downloaded

    2012-05-01 19:38:26,181 (12f8) :  INFO (core:324) - SMIL is &lt;smil xmlns="http://www.w3.org/2001/SMIL20/Language"&gt;
    
    	&lt;head&gt;
    
    		&lt;meta base="http://static.smdg.ca/videoPlayer/" /&gt;
    
    	&lt;/head&gt;
    
    	&lt;body&gt;
    
    		&lt;ref src="Unavailable.flv" title="Unavailable" abstract="You are not in a geographic region that has access to this content."/&gt;
    
    	&lt;/body&gt;
    
    &lt;/smil&gt;
    


    It's very strange... it thinks I am not in Canada? Yet, browsing HGTV.ca the videos work fine. I wonder if the URL is getting messed up.
  • GerkGerk Posts: 1,052Members, Plex Pass Plex Pass
    Is it any particular show? I just tried a few random ones and they are all working fine for me here.

    Also worth noting if you have multiple machines the plugin runs on the machine it's installed from and feeds your client the video from there. Do you have unblock-us or anything like that setup on another machine? I ask because that's how I run my setup here ... unblock-us on one machine (with several US only plugins installed on it) and another machine with all the rest of my video plugins.
  • GerkGerk Posts: 1,052Members, Plex Pass Plex Pass
    Deck Wars Season 2? I just tried these ones here and there are 3 that didn't work .. the party deck, the kids deck and another one right after that (I forget the name), but all the others worked. I've seen the htgv site screw up like this before for some videos but it's usually transient from what I've seen in the past. Is it just a few of these not working or other videos too?
  • jkeirsteadjkeirstead Posts: 22Members
    Gerk wrote:

    Deck Wars Season 2? I just tried these ones here and there are 3 that didn't work .. the party deck, the kids deck and another one right after that (I forget the name), but all the others worked. I've seen the htgv site screw up like this before for some videos but it's usually transient from what I've seen in the past. Is it just a few of these not working or other videos too?

    I tried a bunch of various shows and can not find one that works...

    Indeed, I do have unblock-us, but usually that allows Canadian sites like HGTV.ca to go through. And it works fine from the browser, just not Plex. Very strange. At any rate seems to be something specific to my setup.
  • GerkGerk Posts: 1,052Members, Plex Pass Plex Pass
    I haven't had good luck with unblock-us and htgv.ca specifically ... their tech support told me that to work properly with hgtv.ca that I had to disable unblock-us. Also worth noting that the site that the videos are actually coming from is not the hgtv.ca servers ... so if the unblock-us people added an exception for the htgv.ca server they probably didn't for the CDN server that's actually serving up the video. When you browse through the web the CDN probably knows that the request is coming from the hgtv.ca web site -- but with this plugin it's not, it bypasses the hgtv site and goes directly to the source. I suspect that's the root of your problems.

    If you have multiple machines I would suggest taking an approach like I'm doing, install PMS on a machine that doesn't run unblock-us and install all the canadian video channel plugins on that machine. They will still be available and work on the machine that's running unblock-us. This approach worked wonders for me, best of both worlds without having to lift a finger. As an alternative if you write a plugin for hgtv.ca that uses a site config (i.e. shows the video from a virtual web page on hgtv.ca's server) it would probably work if you can view the same videos on the site itself.

    Hope this helps.
«1345678
Sign In or Register to comment.