PleXBMC client for XBMC

For those that wanted to try some other skin - latest Quartz Reloaded has initial support for Plexbmc (no shelf items ATM).



It’s available from my Git repo and you’ll need XBMC Frodo to use it.



Have fun.



Yeah, sorry about this. It's my incremental developement style :) The repo is on my list of things to do - but at the moment the best place to get updates is on this thread. every new version will be postd here and I will update the first post with details. This is copied over to XBMC.org (so they should both be in sync). I've just started re-writing and updating teh first post information for Frodoo, as it's pretty out of date - which I should finish tonight.


Hmm, ok - i've just updated my revo to frodo and have noticed this issue. I'll re-check it again as it was working - it's really frustrating that XBMC doesn't just let me set my own flags - it overrides some of the standard functions if it see certain metadata, relating to resume points, durations and playcounts.

Plus there seems to be an issue with the script.favorites dependancy I use - not sure why. So if it doesn;t install correctly, thats why.


Good news! Hope you intend on getting the shelf to work, preferably with the "on deck" section. Also, would it be possible to be able to have user definable sub-items (favorits) under each PMS section?


Thanks for the new version hippojay.

I set the Debug level to 3, and this is what I get in the log (full file attached):


17:35:43 T:2684310592  NOTICE: PlexGDM: Sending registration data: HELLO * HTTP/1.1<br />
                                            Content-Type: plex/media-player<br />
                                            Resource-Identifier: a5b8a41c-4bf0-4c01-9db4-fa2fb690c546<br />
                                            Name: PleXBMC Client<br />
                                            Port: 3000<br />
                                            Product: PleXBMC<br />
                                            Version: 3.0.5<br />
17:35:44 T:2930082880  NOTICE: PlexGDM: Unable to check status<br />
17:35:44 T:2930082880  NOTICE: PleXBMC Helper -> <module>: Client is no longer registered<br />
17:35:44 T:2930082880  NOTICE: PleXBMC Helper -> <module>: PlexBMC Helper still running on port 3000



As previously, hitting the Helper directly returns 200 OK:


PleXBMC Helper Remote Redirector: Running<br />
Version: 0.1HTTP/1.0 200 OK<br />
Server: BaseHTTP/0.3 Python/2.7.3rc2<br />
Date: Sun, 27 Jan 2013 17:37:48 GMT



I'm not sure if this helps or not, but if there is anything else I can do to help debug this issue, let me know!


Well this will depend on time I will have at disposal and on Hippojay as he would need to implement support for On Deck into script.

No plans for sub-items. To be frank, I don't like them at all but they are necessity on xbmc. What would be nice is to go directly to movies but have possibility to pull-up filters menu once you're there - as on iOS client.


What's the difference between plex and xbmc style flags? Partially watched flag? If so I think they work just fine in Reloaded. Or am I mistaken?

Durations seemed to look fine (in minutes like xbmc) and resume points are working fine at my side. Lower the requirement for fav script (just to be sure) and make sure to use x.y.z versioning not x.yz or such as you may end up in dead alley in some cases.


Just had a quick look and onDeck has the same XML structure as recentlyAdded, although it has an extra type 'episodes' (recentlyAdded only goes up to the season level). So it would be fairly straight forward to make it work instead of recently Added. Still not sure I understand what onDeck is supposed to give. Mine seems to be a random collection of stuff from all over the place.




Yes, when I started doing the addon, XBMC has no concept of a partial flag. However, that has changed in Frodo, with the "IsResumable" property. This is an XBMC internally calculated property based on the resume time and the duration. If resume > 0 and < duration - then it will set the flag. I could make use of this, however it would mean that an incorrect resume point could be called up:

1. User generated XBMC listing page of movies on client
2. User then watched on another client, but only half way.
3. User then attempts to resume on the original client without refreshing the listing

I'm not sure what the impact of this would be, although I could just pop in the up to date resume and let it start fro there regardless of the actual (incorrec) time displayed on screen. I would also need to pull out the resume time earlier into the listing (as the moment I don't bother, as I read it at play time). On the upside, it would mean that I could use the XBMC generate resume dialog, instead of my own select box. Hmm, perhaps I'll knock up a demo and see what that plays like...

Anyway, to get around this problem, I manually set the flags. I used to do this directly with the overlay, but that doesn;t work now, as XBMC attempts to set it itself. So, I set a property called IsResumable (a listitem.property(isResumable) rather than a listitem.isresumable ) which works in teh same way. I added it to the include variables to get tested after the standard XBMC ones.



DUration and resume should be ok. Durations are now set as part of the stream data, through a new python interface ( listitem.addstreaminfo() ) as the older way of setting durations has been changed.

I'll look at the script.favorite version. I had it set as 4.0.7 - but that didn;t work either. I'll check out some other addons to see what they set them as (I guess you still use them, so i'll have a look at reloaded).

On that point, I haven;t had a time to check out reloaded yet - but I will do.


Hmm. then it is as I thought. FYI, I'm using your properties in Reloaded already and they seem to work fine - don't know why you have problems on Revo..

BTW, are you fetching TV banners in current version? ListItem.Art(banner) seems empty in script?

PS: we can cook-up some custom dialog for resume if need be.


Unfortunately I can't set all the listitem values in the addon, the XBMC interaces don;t exist (hence the reason I cannot manually set the isresumable property). Banner is one of those. I can set a custom property though (like listitem.property(banner)

(in fact I think I used to, but took it out as it was too difficult to integrate, however the appearance of variables, means that it might be a lot easier to do now.)

One more for the to do list..

Right - I’ve updated port #2 with a complete listing of all PleXBMC Skin specific interfaces and properties - these are the items you need to use to create/mod a skin for plexbmc



http://forums.plexapp.com/index.php/topic/27270-plexbmc-client-for-xbmc/page__view__findpost__p__174269



EDIT: And first post updated now with updated information. Screencasts are stil lout of date, so I will get some new ones completed tomorrow.

Hey guys,



Just started with this whole home theatre thing, so I might be a bit slow.



Anyways, I have PleXBMC installed on my Pi, and I have the server running on my Mac, with a few movies on it.



So when I open the plex addon on my Pi, it loads into a screen saying MBP: Movies, MBP: TV Shows, myPlex Queue, Channels, and Plex Online.



My server is called MBP, and I made two sections, Movies and TV Shows.



The problem is that when I click on the Movies, for example, the loading wheel on the Quartz theme spins for about a minute, then boots me back to the same screen, without showing any movies. The same thing happens with TV Shows.



However, it shows all my channels, except TSN, which I guess is another topic, unless somebody knows why?



Anybody have any idea what’s going on?



P.S. It worked for me once, streaming and everything, but now I don’t know what changed!



Log: xbmc log.txt (380 KB)



Is this related to how when resuming a video xbmc will ask if you want to resume at a certain time and then plexbmc will ask the same question?


I've had a quick look and I'm a bit confused by the entries in the log. It seems that MBP is shown locally to have two different addresses and two server entries: a 192 and a 25 address. Myplex shows it with a 173, which I guess is the external address. I can see that plexbmc is trying to use the 25 address locally, but that this fails.

EDIT: Had another look. You have used 192 as the PMS address in plexbmc. But when it talks to the server on this address, it is given back data which shows the PMS is on the 25 address. It then attempts to talk to the server on 25 which fails. I'm not sure why (moving the mac book between networks, or being multi-homed):


<br />
16:25:01 T:2936009792  NOTICE: PleXBMC -> getURL: url = http://192.168.1.119:32400/system/library/sections<br />
16:25:01 T:2936009792  NOTICE: PleXBMC -> getURL: header = {}<br />
16:25:01 T:2936009792  NOTICE: PleXBMC -> getURL: ====== XML returned =======<br />
16:25:01 T:2936009792  NOTICE: <?xml version='1.0' encoding='utf-8'?><br />
                                            <MediaContainer noHistory="0" replaceParent="0" size="2" identifier="com.plexapp.system"><br />
                                              <Directory key="aHR0cDovLzI1LjE1LjE3LjE3OjMyNDAwL2xpYnJhcnkvc2VjdGlvbnMvMQ__" art="/:/resources/movie-fanart.jpg" unique="1" name="Movies" title="Movies" type="movie" serverVersion="0.9.7.11.386-d353989" uuid="X" host="25.xxx.xxx.xxx" serverName="MBP" path="/library/sections/1" machineIdentifier="X" local="1" port="32400" thumb="/:/resources/movie.png"/><br />
                                              <Directory key="aHR0cDovLzI1LjE1LjE3LjE3OjMyNDAwL2xpYnJhcnkvc2VjdGlvbnMvMg__" art="/:/resources/show-fanart.jpg" unique="1" name="TV Shows" title="TV Shows" type="show" serverVersion="0.9.7.11.386-d353989" uuid="X" host="25.xxx.xxx.xxx" serverName="MBP" path="/library/sections/2" machineIdentifier="X" local="1" port="32400" thumb="/:/resources/show.png"/><br />
                                            </MediaContainer><br />





<br />
16:25:12 T:2868900928  NOTICE: PleXBMC -> getURL: url = http://25.xxx.xxx.xxx:32400/library/sections/1<br />
16:25:12 T:2868900928  NOTICE: PleXBMC -> getURL: header = {}<br />
16:26:16 T:2868900928  NOTICE: Unable to connect to 25.xxx.xxx.xxx:32400<br />
                                            Reason: [Errno 110] Connection timed out<br />


Thanks hippojay, that helped me out a lot! At first I was just looking at what Plex thought my IP was, which was 25.xx.xx.xx or something like that, and when I googled it, it turned out it was the UK Ministry Of Defence! So a simple restart solved the problem, and now it has the same IP as the one my Mac has, which is the one I put into the addon settings on my Pi. My other question is whether it’s a known bug for some channels, such as TSN, to not show up?

Hippojay,



looks like WOL is not fired up on Home page load? If I run script from addons all is good.

Hi HippoJay!



Thank you for a great plugin. I’m experiencing the following error most likely related to German Umlauts:



20:23:47 T:2682215232   ERROR: Error Type: <type 'exceptions.UnicodeDecodeError'><br />
20:23:47 T:2682215232   ERROR: Error Contents: 'ascii' codec can't decode byte 0xc3 in position 3: ordinal not in range(128)<br />
20:23:47 T:2682215232   ERROR: Traceback (most recent call last):<br />
                                              File "/home/media/.xbmc/addons/plugin.video.plexbmc/default.py", line 3676, in <module><br />
                                                getContent(param_url)<br />
                                              File "/home/media/.xbmc/addons/plugin.video.plexbmc/default.py", line 2182, in getContent<br />
                                                TVEpisodes(url,tree)<br />
                                              File "/home/media/.xbmc/addons/plugin.video.plexbmc/default.py", line 1444, in TVEpisodes<br />
                                                details['title'] = "%s - %sx%s %s" % ( details['tvshowtitle'], details['season'], str(details['episode']).zfill(2), details['title'] )<br />
                                            UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 3: ordinal not in range(128)



This is with Eden, plugin version 2.1.


Found it - I'd left a "playcount" property in which was overriding the rest of the settings. Fixed now and will issue a new plexbmc version when I've had a chance to check/test all my changes.

Also, you shouldn't be being asked twice for a resume decision. This is one of the changes that Frodo has allowed me to make. Let me know if you are.


Hmm, I don't have any WOL enabled devices, but I can see it being run in the log files if I enable it and pop in a made up MAC address. Not sure how you have set up your skin, but if you use a home screen direct link to the PlexBMC settings, then XBMC doesn't refresh the home screen (and therefore run the plugin script again) when you make changes. You would need to go into a another menu item to force it to refresh. It's annoying and I'm looking for a fix.

This might be what you are seeing?


Hmm, if you aren't seeing a client, then it looks like the multicasts aren't getting through to the media server. This might be backed up by the check failing, as it can't find any servers to check with (none are responding).

So, what to check next:
1. The easiest check, is to see if the client is showing up in plex media server: http://ip:32400/clients . Start plex helper then check, it's very fast to update.
2. I have a [new helper version](https://www.dropbox.com/s/mstc3fws1pa7ptc/script.plexbmc.helper-v3.0.3.zip), which has yet more debugging, to check for discovered servers, empty lists, and full results from checks. This would confirm.
3. Not sure what Media Server version you have, but something fairly recent (i.e. at least or better than 0.9.6)
4. Check that GDM is turned on in the media server settings.