[REL] Ring of Honor plugin

Proof-of-Concept; need help making something workable
Hey guys. Attached is a proof-of-concept for my plugin for Ring of Honor. Right now, the only functionality is to stream the most recent episode of ROH's TV show from their website, but I plan to add in more. Since I'm a Python n00b, and rather out-of-practice at coding, I thought I'd put it out there and get opinions and pointers. Specifically, I wanted to ask the following:

[list=1]
[*]Is there a more efficient way to scrape the page? It takes a while just to get one item, so I shudder to think of how long it'll take to scrape the entire videos section of the site. (Have I mentioned I never worked with Python before? Because I haven't, and I'm sure I didn't find the optimal way to do things)
[*]I've noticed a really strange issue. The plugin works fine if I run it on the same box that's running Plex Media Server, but if I run it on a remote client, the sound actually plays on the server instead and continues playing even if the video is stopped. I'm not sure if this is a problem with my code or just a beta issue with PMS Laika on Windows; help?
[*]Lastly, I don't have access to a Mac for testing (all my boxes are AMD, so even Hackintoshing is not an option), so I was hoping some of the Mac users out there could try it out and see if it works for them.
[/list]

Yes, I know it's spaghetti code, and I will break it out into functions, add error-checking, and what have you before it even goes into beta. I just wanted to get playback working and go from there.

Please note that, to use the plugin, you will need to sign up for a myROH account at http://www.rohwrestling.com and enter your username and password in Preferences.

EDIT - Removed attachment, as an alpha release version is now at http://forums.plexapp.com/index.php/topic/36419-rel-ring-of-honor-plugin/


Case in point; I just figured out what JSON is, and thus was able to eliminate an import from the plugin (I was parsing a JSON object using an ast.literal_eval function instead of using the JSON class that the Plex devs so thoughtfully gave us). I feel a bit silly, but I'm realizing I picked the right project for a learning experience.

On the plus side, as I'm scraping the videos section, I'm realizing that the process time doesn't really increase all that much even if I'm xpathing through a larger number of elements. So I've got that going, which is nice.

Anyway, I'm going to shoot for an alpha release for the plugin this weekend; in the meantime, if I can get feedback on any of the topics I listed, I'd appreciate it.

OK, I’m preparing my channel for an actual release, and I tried to re-do the art, but Plex still shows the old art. How can I force it to reload the art from the files? I’ve tried reloading both PMS and the frontend, but that doesn’t work.



EDIT: Nevermind, figured it out. Have to delete the Thumbnails folder under appdata/plex.

And I now have an alpha release!



http://forums.plexapp.com/index.php/topic/36419-rel-ring-of-honor-plugin/



I could still use help with that remote playback issue, though, if possible.



Congrats on the new plugin! :D
The sound issue with remote playback is almost certainly that Soundflower is not installed on the server box. Check the PMS prefs and install it as required :)

[http://img839.imageshack.us/img839/831/screenshot20120114at123d.png](http://imageshack.us/photo/my-images/839/screenshot20120114at123d.png/)

Thanks for the info. Unfortunately, my PMS server is a Windows 7 box. Is there an alternative for SoundFlower that I can use on Windows?



At the very least, it’s good to know it’s probably not my plugin code that’s the issue. :slight_smile:

I just noticed today that my lovely plugin is no longer working. It looks like some cookie is not being set; it still seems to go through the motions of logging in, but it seems like pages are being returned as if the user is not logged in from what I’m able to get from the logs. Any ideas what might cause this? I thought maybe the ROH folks might have instituted user agent checking, but spoofing a user-agent string doesn’t seem to help.



Oh, and the previous issue with the sound seems to have disappeared on its own. Weird.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.