This is my third re-write of this little info piece :-)
Version 0.3.2
__________________________________
OVERVIEW:
The PLEX developers made it easy to write PYHTON scripts to collect MEDIA-ITEMS
from the internet.
A lot of complexity is hidden behind a FRAMEWORK, which takes care of CACHING
/ Complexity of function calls / automatic UPDATES etc. etc.
THE CURRENT version for the FRAMEWORK is #1 (#0 was the initial cut). The
Framework itself, along all other plug-ins are located in:
"~/Library/Application Support/Plex Media Server/Plug-ins/"
A big update to the FW is getting ready as I write this (05-29-09). With many more
bells and whistles! (Thank you JAMES & ELAN!)
As a plug-in developer your job is to collect / scape for MEDIA-ITEMS and then
give it back to PLEX.
Your plug-in returns a MEDIACONTAINER back to PLEX.
"spaceman" described SEVEN-ITMES these containers may provide:
MEDA-ITEM: it’s a list of items with URL / THUMB/ TITEL etc. etc. ==> This
will be presented within PLEX as a clickable item with as much info as you
supplied (scraped etc.) Depending of the kind and location of an item PLEX
differentiates 4 types:
* VideoItem: The target should be a regular video item (e.g. avi, asf, mov, mpeg)
* WebVideoItem: The target should be a webpage which contains an embedded video player (e.g. Flash, Silverlight)
* PhotoItem: Exactly what it sounds like.
* TrackItem: Audio.
DIRECTORY-ITEM: In some cases your selected web-site has nested layers for
selection before you get to the actual MEDIA-ITEMS. PLEX allows you to re-
create this kind of structure and provide DIRECTORIES (pages) with items you
can select to get to the MEDIA-ITEM of your choice.
POP-UP-DIRECTORY-ITEM (PopupDirectoryItem):
This is a "fancy" directory, which pops in a WINDOW on top of PLEX. You probably
saw it when you used the APP-STORE to install a plug-in. The item there is the INSTALL-MENU.
The menu displays on top of the current one. Looks like a contextual menu.
.
SEARCH-ITEM (SearchDirectoryItem): This works like a directory-item, just giving you a PROMPT-FOR-
INPUT before it will display the new directory.
MESSAGE-DIRECTORY-ITEM (MessageContainer): This is a dialog box, which you can present with
just an "OK" button; Used mostly with redirects
The MEDIACONTAINERS can contain any MIXURE of these items, EXCEPT the POP-UP-DIRECTORY-ITEM.
The best way to get started with your project, is to look at existing plug-
ins. Below you will find some info on how to best setup your system to make
your development a little easier. I will also start a new topic about the
best tools / tricks of the trade ... the next revision of this will have a
LINK to this.
This is NOT rocket science the PLEX developers made it very easy and help you
along your way; I just started April 14th 2009 ... learning PYTHON, the PLEX
framework, LXML, etc. from scratch and have four nice plug-in under development
(two are finished)
right now:
*****> COMPIZmediacenter <*****
HAPPY CODING
Robert
__________________________________________________________
START:
Just take an existing plug-in; if you can: similar to the one you want to
develop.
__________________________________________________________
FRAMEWORK SELECTION
NOTE: You should use Version 1 as this is the current one MUCH improved
over #0. This tutorial is based on #1.
To SELECT the correct FRAMEWORK, please add
Start a Terminalthen type$ killall "Plex Media Server"this will kill an existing onethen you type:$ ~/Library/Application\ Support/Plex/Plex\ Media\ Server.app/Contents/MacOS/Plex\ Media\ Server(you can copy and paste this, but leave off the "$", of course)
__________________________________________________________
Missing items within this DOCUMENTATION:
- "exotic / advanced" things one can do from within a plug-in (e.g. run an
EXTERNAL function (dll etc.) / start - stop other programs, multithreading)
Any feedback is welcome :-)











