PleXBMC client for XBMC

Ok - there is some ‘Shelf’ functionality within PleXBMC. It’s currently disabled, but if you want to re-enable it you need to uncomment out the line “shelf()” near the bottom of default.py. This should set the LatestMovie properties:



<br />
if str(sys.argv[1]) == "skin":<br />
    discoverAllServers()<br />
    skin()<br />
    #Not working yet<br />
    #shelf()<br />
elif sys.argv[1] == "update":<br />





And some background:
It was put together to try and get Quartz V3 to show recently added movies and TV Shows. The function themselves work, but there was an issue with displaying the images (XBMC would go into a loop trying to load the image). I tried to work out what was happening but it really didn;t make any sense to me.

Unfortunately, at this time pecinko decided that he was no longer going to be able to continue working/helping with the changes needed for PleXBMC - and I really didn't have time to dig dee into skins and XBMC code again (it's *very* time consuming). It might work better in Frodo, but I haven;t checked.

Now that this thread is more active again, I would like to ask again if the Queue is working for everyone. Mine shows up, along with thumbnails, but when I try and play a clip, I only get a menu asking what resolution, and then nothing, it goes back to the queue listings. Every third clip or so I’ll get the “One or more items couldn’t play” message. Has anyone encountered this? Any direction for a fix?



Aside from that, PleXBMC is awesome. Plex backend and XBMC frontends are the perfect combination for me. Thanks for all the hard work, I appreciate it!



-Dan

Hi,



When testing the queue, I could play back I player and some YouTube content. I say “some” because I also was getting erratic issues. Sometimes a video would play, but next day it didn’t.



I did drill down into the Plex data and couldn’t get it to splay directly, ago assumed it was a Plex issue.



What is the source plugin for the content?



Thanks for the reply.

I enabled the shelf line as you said and it seems to be working according to the debug log. It picks up all the latest movies and shows.

Now, I am unsure what as to what I should do to access the recent files.

What should I change this to, to get it to work?


<onclick>PlayMedia($INFO[Window.Property(LatestMovie.1.Path)])</onclick>



Thanks

Edit: Managed to sort it out, Thanks

First of all, great plugin! Good to see continued development!



I was thinking about the modded quartz skin, is it not possible to have the different sections line up horizontally? Like it is now everything but TV shows is bundled together under “Movies”, be it kids videos, documentaries or whatever.



Getting the “on deck” section to show up on the shelf would of course be great. I wish I could help with skinning but I have 0.0 knowledge of this stuff. Too bad pecinko has stopped helping :frowning:



/AG

First of all many thx for the hundrets of hours work! Thank you hippojay!!!




I have the same issue.
On the plexmbc wiki i read that their should be a "dummy library" inside the quartz plexmbc skin. But i couldnt find it.
It is longer nacessary?
Or is the integration temporarly broken or doing i and "aden" something wrong?
Greetz

Dummy Library is no longer needed - it was a hang over from Dharma when you needed to ‘pretend’ you had a library to get views to work. I’ll need to clean that up on the wiki (the XBMC one?)



As for the Quartz skin and getting shortcuts to add into the home screen. The only way to get stuff to appear in the menus is for them to be library sections or certain special links (such as plugins and myplex queue). Shortcuts added would appear at the top - however I’ve never used them so can’t be 100% sure. The plan was to get more of the channel/on deck/recently stuff on the main screen with Quartz V3, but that’s currently a secondary consideration over getting plexbmc 100% working… I wish I had more time to spent, but skin development is a lengthy process.



Was just about to post it up (for anyone else watching its:


<onclick>$INFO[Window.Property(LatestMovie.1.Path)]</onclick>



If you want to see what had already done on Quartz V3, you can find it on github -> Quartz -> plexbmc branch: https://github.com/hippojay/quartz/tree/plexbmc . It was all working with the exception of loading the thumbnails on the shelf. For some reason they just loop, nothing gets loaded and XBMC finally grinds to a halt:


<br />
22:29:20 T:30700   DEBUG: CImageLoader::DoWork - took 114 ms to load special://masterprofile/Thumbnails/3/3c298925<br />
22:29:20 T:30440   DEBUG: CImageLoader::DoWork - took 121 ms to load special://masterprofile/Thumbnails/3/3c298925<br />
22:29:20 T:40072   DEBUG: CImageLoader::DoWork - took 114 ms to load special://masterprofile/Thumbnails/3/3c298925<br />
22:29:20 T:36180   DEBUG: CImageLoader::DoWork - took 142 ms to load special://masterprofile/Thumbnails/3/3c298925<br />
22:29:20 T:30440   DEBUG: CImageLoader::DoWork - took 108 ms to load special://masterprofile/Thumbnails/3/3c298925<br />
22:29:20 T:40072   DEBUG: CImageLoader::DoWork - took 135 ms to load special://masterprofile/Thumbnails/3/3c298925<br />
22:29:20 T:30440   DEBUG: CImageLoader::DoWork - took 110 ms to load special://masterprofile/Thumbnails/3/3c298925<br />
22:29:20 T:36180   DEBUG: CImageLoader::DoWork - took 147 ms to load special://masterprofile/Thumbnails/3/3c298925<br />
22:29:20 T:40072   DEBUG: CImageLoader::DoWork - took 116 ms to load special://masterprofile/Thumbnails/3/3c298925<br />




Hmm, just checked and it does look like something unintended is happening - although I can't work out why. I think I'll need to ask Elan for some more info on the XML that is provided because I must be missing something vital when setting up the player.


That's interesting. Any way to have the "on Deck" listed instead of the recent files? Or both? What skin are you using to do this? How does it look?

I have plexbmc running in eden pretty nicely right now with quartz or aeon-nox (I like the latter better), on deck is pretty much the only thing I miss. But the ability to load a subtitle at play time is just priceless!


I tried that but didn't work. Adding 'Plexbmc' before 'LatestMovie' seemed to get it to work though:


<onclick>PlayMedia($INFO[Window.Property(Plexbmc.LatestMovie.1.Path)])</onclick>





I changed the getThumb to getFanart. Xbmc runs fine but I only get the odd 1 or 2 fanart showing up, the rest are blank. I've not had a chance to look at the log to see why, I'll probably do that tomorrow.



To use on deck, you'll have to edit the default.py in the plexbmc plugin folder. Change the line under 'def shelf( )' from:


html=getURL('http://%s/library/recentlyAdded' % server)



to


html=getURL('http://%s/library/onDeck' % server)



bear in mind I am not a coder, nor have I tested this.

As for the skin, I'm currently running Lightbox. It looks pretty much the same as the screenshot found in the XBMC forum under Skin Development > WIP Skins.
Recently, I've been changing skins nearly every other week.


Excellent! I'll try. This skin looks really nice!

On thing that keeps happening to me on the windows xbmc (and apparently not on the osX one) is that it keeps freezing every once in a while with an exception thrown in CApplication::Process(). I'm not sure it's related to Plexbmc, but it's happening pretty systematically since I installed that add-on. Any way to get more information about this?

Here's the end of the log; I was playing something before, playback stops normally at the end of the file. I don't think the CD stuff has anything to do with it as I've seen this exception in CApplication::Process() happening just by browsing the plex library.
I keep getting the g_stream warning all the time too. I'll try the git version of plexbmc. Right now I'm using 2.0b6.


<br />
08:48:16 T:3788  NOTICE: -->Python Interpreter Initialized<--<br />
08:48:16 T:3788   ERROR: C:\Program Files (x86)\XBMC\addons\plugin.video.plexbmc\default.py:765: SyntaxWarning: name 'g_stream' is used prior to global declaration<br />
                                              global g_stream<br />
08:48:16 T:3788  NOTICE: ===== PLEXBMC START =====<br />
08:48:16 T:3788  NOTICE: PleXBMC -> running on (2, 6, 6, 'final', 0)<br />
08:48:16 T:3788  NOTICE: PleXBMC -> running on 2.0b rev 6<br />
08:48:16 T:3788  NOTICE: PleXBMC -> Running with cElementTree on Python 2.5+<br />
08:48:16 T:3788  NOTICE: PleXBMC -> Debug is turned off.  Running silent<br />
08:48:17 T:1528  NOTICE: DVDPlayer: Opening: http://10.0.0.100:32400/library/parts/1874/file.mkv<br />
08:48:17 T:1528 WARNING: CDVDMessageQueue(player)::Put MSGQ_NOT_INITIALIZED<br />
08:48:17 T:1496  NOTICE: Creating InputStream<br />
08:48:17 T:1496  NOTICE: Creating Demuxer<br />
08:48:17 T:1496  NOTICE: Opening video stream: 0 source: 256<br />
08:48:17 T:1496  NOTICE: Creating video codec with codec id: 28<br />
08:48:17 T:1496  NOTICE: CDVDVideoCodecFFmpeg::Open() Using codec: H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10<br />
08:48:17 T:1496  NOTICE: Creating video thread<br />
08:48:17 T:1496  NOTICE: Opening audio stream: 1 source: 256<br />
08:48:17 T:1496  NOTICE: Finding audio codec for: 86019<br />
08:48:17 T:716  NOTICE: running thread: video_thread<br />
08:48:17 T:1496  NOTICE: Creating audio thread<br />
08:48:17 T:3092  NOTICE: running thread: CDVDPlayerAudio::Process()<br />
08:48:17 T:3092  NOTICE: Creating audio device with codec id: 86019, channels: 2, sample rate: 48000, no pass-through<br />
08:48:17 T:716  NOTICE:  fps: 25.000000, pwidth: 1280, pheight: 720, dwidth: 1280, dheight: 720<br />
08:48:17 T:716  NOTICE: Display resolution DESKTOP : 1920x1080 @ 50.00 - Full Screen (12)<br />
08:48:17 T:716  NOTICE: D3D: rendering method forced to DXVA2 processor<br />
08:49:17 T:1868  NOTICE: ES: Client  from 127.0.0.1 timed out<br />
08:55:16 T:3092 WARNING: CDVDMessageQueue(audio)::Get - asked for new data packet, with nothing available<br />
08:55:17 T:716 WARNING: CDVDMessageQueue(video)::Get - asked for new data packet, with nothing available<br />
08:55:17 T:1496  NOTICE: CDVDPlayer::OnExit()<br />
08:55:17 T:1496  NOTICE: DVDPlayer: eof, waiting for queues to empty<br />
08:55:17 T:1496  NOTICE: DVDPlayer: closing audio stream<br />
08:55:17 T:1496  NOTICE: Closing audio stream<br />
08:55:17 T:1496  NOTICE: CDVDMessageQueue(audio)::WaitUntilEmpty<br />
08:55:17 T:1496  NOTICE: Waiting for audio thread to exit<br />
08:55:17 T:3092  NOTICE: thread end: CDVDPlayerAudio::OnExit()<br />
08:55:17 T:1496  NOTICE: Closing audio device<br />
08:55:17 T:1496  NOTICE: Deleting audio codec<br />
08:55:17 T:1496  NOTICE: DVDPlayer: closing video stream<br />
08:55:17 T:1496  NOTICE: Closing video stream<br />
08:55:17 T:1496  NOTICE: CDVDMessageQueue(video)::WaitUntilEmpty<br />
08:55:17 T:1496  NOTICE: waiting for video thread to exit<br />
08:55:17 T:716   ERROR: Got MSGQ_ABORT or MSGO_IS_ERROR return true<br />
08:55:17 T:716  NOTICE: thread end: video_thread<br />
08:55:17 T:1496  NOTICE: deleting video codec<br />
08:55:17 T:1496  NOTICE: CDVDPlayer::OnExit() deleting demuxer<br />
08:55:17 T:1496  NOTICE: CDVDPlayer::OnExit() deleting input stream<br />
08:55:18 T:3852  NOTICE: -->Python Interpreter Initialized<--<br />
08:55:18 T:3852   ERROR: C:\Program Files (x86)\XBMC\addons\plugin.video.plexbmc\default.py:765: SyntaxWarning: name 'g_stream' is used prior to global declaration<br />
                                              global g_stream<br />
08:55:18 T:3852  NOTICE: ===== PLEXBMC START =====<br />
08:55:18 T:3852  NOTICE: PleXBMC -> running on (2, 6, 6, 'final', 0)<br />
08:55:18 T:3852  NOTICE: PleXBMC -> running on 2.0b rev 6<br />
08:55:18 T:3852  NOTICE: PleXBMC -> Running with cElementTree on Python 2.5+<br />
08:55:18 T:3852  NOTICE: PleXBMC -> Debug is turned off.  Running silent<br />
08:55:18 T:3852  NOTICE: ===== PLEXBMC STOP =====<br />
08:55:18 T:1528  NOTICE: CDVDPlayer::CloseFile()<br />
08:55:18 T:1528 WARNING: CDVDMessageQueue(player)::Put MSGQ_NOT_INITIALIZED<br />
08:55:18 T:1528  NOTICE: DVDPlayer: waiting for threads to exit<br />
08:55:18 T:1528  NOTICE: DVDPlayer: finished waiting<br />
08:55:21 T:3788  NOTICE: ===== PLEXBMC STOP =====<br />
08:55:31 T:1528   ERROR: exception in CApplication::Process()<br />




Care to share your changes to adapt metro.TV to plexbmc? That'd kickstart me :)

Has beta 7 launched and if so where can I get it

Thanks for the great work



Not yet - there are some fixes and new stuff ready to go, but I want to try and get a few other things done first. Check out the [to do list](https://github.com/hippojay/plugin.video.plexbmc/wiki) for what's being planned.

If you want to keep track of what happening, you can follow the [commit log on GitHub](https://github.com/hippojay/plugin.video.plexbmc/commits/eden), which shows what sort of stuff has gone in.

hippojay thank you very very much for this plug-in, and the last beta 6! its all i could possible dream! I have it working on my raspberry pi, and its working flawlessly!!! It uses 0 processing on my remote server computer (its the only client i have that does this, pc or ios uses a lot of processing on server) and the movie quality its like seeing the movie locally. Now with the working subtitles i couldnt ask for nothing more. Outstanding work, i dont know how you could improve it more, but im sure you will :slight_smile:

Hi and thanks for the wonderful plugin! I just installed it with Quartz and it looks beautiful.



One question (forgive me if this has been explained before) - is there a way to include the Plex libraries in the XBMC main menu? I.e. under Movies>Family Movies, Adult Movies, etc., TV Shows>Family shows, etc. Right now I have Movies>Video files>Add-ons, and when I click on Add-ons>PlexBMC.



Thanks!

Another quick question… (it’s late and I am messing around trying to figure out how everything works…) - I seem to have lost the ability to choose the way the movie information/fanart is displayed. Is that something I have accidentally turned off in the settings?



I am using the latest posted files: Quartz 0.5 and PlexBMC 2.0b6



Thanks!



With the modified Quartz skin, you should be able to switch on "integration" from within the skin setting (from memory its in settings -> quartz -> general -> Plex integration). This will use the Plex section names on the home screen. There is an issue where I have accidentally reversed the logic (I.e. on is off and off is on) so you might need to play with it till you can see the entries.




In the plexbmc settings you can alter the "look and feel" of the addon, such as turn off some data, images, etc. try looking in there and unselect those entries.

Can we get a ‘shelf’ script for latest albums/music?



Is is just a matter of copying the latest movie script and tweaking it for music?



Thanks