The HGTV channel in the store pulls the list of shows from a specific URL. Thanks to the dubious quality of HGTV’s site, however, not all of the available online shows are on that list.
An example is the show Property Brothers. It’s show can be found at http://www.hgtv.com/property-brothers/show/index.html, but it’s not in the main list at http://www.hgtv.com/full-episodes/package/index.html.
Any enterprising devs out there care enough to find a fix, or perhaps add a channel just for Property Brothers? I’ve been trying to modify the HGTV channel code to just show the Property Brothers show list, but I’m not a good enough programmer to have had any success yet.
Can you find a better list of shows on their site anywhere? I’d rather go from a single listing that has everything if possible, the problem is that if we start arbitrarily adding shows as one-offs it will make the channel unmanageable very quickly as they decide to change the show url’s (and they do surprisingly often, or at least have done in the past).
They tend to eventually update that page but sometimes it can take a while before they remember that it’s there.
That's the catch. I totally understand not wanting to have to maintain the channel with a list of individual shows (which is why I was trying to modify my own copy). Unfortunately, I was unable to find anything on the site that had a full list. The page the channel is using to get the list is the most-complete option.
Maybe I'll see if I can get in touch with their webmasters to update their end...
Good luck with that. Most of those sites hate the fact that Plex (and other similar type software) play their videos. If you go that route it may end up with them trying harder to lock us out of their videos. The way that the channel currently works it wouldn't be easy to put in other individual show pages, you would have to parse them in a different manner than the main show list currently is. If you do want to try and tackle this take a look at the latest dev blog post I wrote about XPath for Channels ... http://devblog.plexapp.com/2012/11/14/xpath-for-channels-the-good-the-bad-and-the-fugly/
To “hack” it into the plugin try this:
In the init.py file, at line 55 (right before the return oc line) add this:
<br />
oc.add(<br />
DirectoryObject(<br />
key = Callback(GetSeasons, path="http://www.hgtv.com/property-brothers/show/index.html", title="Property Brothers", thumb_url=""),<br />
title = "Property Brothers",<br />
thumb = Resource.ContentsOfURLWithFallback(url=thumb_url, fallback=ICON)<br />
)<br />
)<br />
Make sure to get the tab spacing correct (python relies on this for proper syntax). I didn't test this code but it *should* work in theory. This is not a pretty way to do it (and I wouldn't include this in the actual channel code). Property Brothers should show up as the last item in the show list and will hopefully just work in terms of the episodes -- I didn't look that closely at the actual page but it seems in line with the other episode pages.
Works like a charm, thanks! Good enough to work until they (hopefully) get it into the main listing.
Great I suspect there are a few other shows that they haven’t included in that listing. If it goes for too long without them updating things then I guess we may have to take a different approach. If you see other missing shows let me know.
I am having some difficulty adding this line of code Using Text Wrangler to do it and have not gotten it to show up on Plex after restarting the plug-in
Have you used Python before? Unlike most other programming languages, it matters how much space is at the front of each line. If you copied the code from the browser and pasted it into textwrangler, you'll need to delete all of the white space at the beginning of each line and add the correct number of tabs so that it lines up just like the block of code immediately above line 55. Hope that makes sense, I can get a screenshot for you later today to show what it should look like.
^^^ What he said
Here’s what it looks like before editing:
and this is after editing:
Something that's irritating, and maybe Gerk can shed some light on this, is that Plex Media Server seems to periodically overwrite your modified file with the original. I don't know if it's comparing checksums and re-downloading it, but that's what I suspect. Setting the file read-only doesn't help.
So the steps to do this are:
1. shut down PMS
2. Insert new code into __init__.py
3. Copy __init__.py file somewhere safe so you can repeat as necessary
4. Restart PMS
5. Check to see if Property Brothers shows up in list of shows (for me, it ends up either last or 2nd place, and will have the icon of whatever came before it.
6. Watch shows, re-do fix as necessary when PMS decides to undo your changes.
There’s a couple of things you can do to prevent Plex from auto-updating a channel you have edited. One is to move the actual .bundle somewhere else and then setup a symlink to it in the appropriate folder (this is what I usually do), then PMS will not try to update the code back to the channel directory version. The other is that you can add this to the Info.plist file for the channel:
<br />
<key>PlexPluginDevMode</key><br />
<string>1</string><br />
That will also tell PMS not to update it from the source.
The disadvantage is that if we then release updates for that channel you will not get them automatically, but will have to manually either remove that flag or move the bundle back to the Plug-ins directory, or just install a fresh copy from the channel directory.
Good to know, thanks!
Went ahead and make sure to do it with tabs only as described.
No I have not used Python previously.
Also, it still doesn’t work
Hmm, I’m afraid I’m out of ideas. That looks correct to me. Have you tried restarting the server a few times to check? Also, mine shows up in the list as the name of the show before it, doesn’t say “property brothers” until you go into it. In other words, check to see if you are showing two of any show in your list on the HGTV channel.
You both have that code block one tab too far indented, it should be at the same tab level as the “return oc” line. The way you guys have it it’s trying to add an item for Properly Brothers for every single show it picks up on the full episodes page on their website.
If I have some time this weekend I might try and dig into the HGTV channel a bit and add that and any other missing shows, I took a quick look last night and it seems like that’s not the only show that’s missing from the main show listings page
Another issue is that the link used for the show is for the 2-3 minute clips. I need to modify the link for the right address. The issue now is that it keeps editing it back to the old one.
You’re right, the url should be:
<br />
http://www.hgtv.com/hgtv-property-brothers/videos/index.html<br />
Hi
I'm trying to do this, but there are about 30 __init__.py files in plex. I can't find a specific HGTV folder under plug-ins directory either. Can someone post the path of the file that should be updated?
Thanks
Dave
I just submitted an update for this channel … it adds two missing shows, Property Brothers (as listed here), and Candace Tells All – which I found was also missing from the main full episodes listing. It shouldn’t take too long for this to go live, so I suggest that you guys revert your files back to original (or just delete the modified bundle and reinstall it from the server). If you don’t you won’t get this update when it’s published.
If you find other shows with full episodes that are missing please let me know and I’ll add them.