Plex Forums: Developer Quick Start Guide - Plex Forums

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Developer Quick Start Guide Information on how to get an environment setup to develop plugins

#1 User is offline   ndaversa 

  • Member
  • PipPip
  • Group: Members
  • Posts: 18
  • Joined: 29-April 10

Posted 16 September 2010 - 05:35 PM

Hey all,

I'm a developer with c/c++/java/obj-c/etc background. Although I have never touched Python it seems rather friendly.

I know there is really no documentation to go off of, but I wanted to get some getting started info with respect to plug-in development.

I currently have plans to expand the EyeTV Scanner Plug-in (make it more robust, handle Series where applicable and fallback to Movie as a last resort) and perhaps a find videos in RAR archives scanner, so we can use the Plex iOS app to stream stuff even if you haven't extracted the video yet (usecase: downloads wrapped in rars currently being seeded).

I wanted to know a few basics and perhaps consolidate some of the information here so others can get started quickly, so perhaps if anyone has the time they could explain how to do the following (I'm familiar with some of these, but for the sake of completeness):

1. Where to save my .py file so the Plex Media Server picks it up.
2. What libraries to include? (as a boilerplate)
3. Where can I see compiler/syntax errors for my script?
4. Where can I find what commands can be made to the Plex Media Server (easiest way considering there is currently no documentation).

Thanks
ND
0

#2 User is offline   sander1 

  • Plugin Developer/Admin
  • PipPipPip
  • Group: Castle Keeper
  • Posts: 1,246
  • Joined: 02-February 09
  • Gender:Male
  • Location:The Netherlands

Posted 16 September 2010 - 07:04 PM

Hi ND!

View Postndaversa, on 16 September 2010 - 05:35 PM, said:

I know there is really no documentation to go off of, but I wanted to get some getting started info with respect to plug-in development.

Although the docs may not be 100% complete and are written for the v1 framework, there's a lot of info to find there already (v2 framework changes are very small, so the docs are still very usable):
http://dev.plexapp.com/docs/
http://wiki.plexapp....gin_development


View Postndaversa, on 16 September 2010 - 05:35 PM, said:

[...]and perhaps a find videos in RAR archives scanner, so we can use the Plex iOS app to stream stuff even if you haven't extracted the video yet (usecase: downloads wrapped in rars currently being seeded).

Before starting on RAR stuff, have a look at this topic: http://forums.plexap...und-for-plex-9/


View Postndaversa, on 16 September 2010 - 05:35 PM, said:

I wanted to know a few basics and perhaps consolidate some of the information here so others can get started quickly, so perhaps if anyone has the time they could explain how to do the following (I'm familiar with some of these, but for the sake of completeness):
1. Where to save my .py file so the Plex Media Server picks it up.

Plugin bundles (bundle info) are saved in ~/Library/Application Support/Plex Media Server/Plug-ins


View Postndaversa, on 16 September 2010 - 05:35 PM, said:

2. What libraries to include? (as a boilerplate)

For v1 framework:
from PMS import *

For v2 framework: nothing, this is done automatically


View Postndaversa, on 16 September 2010 - 05:35 PM, said:

3. Where can I see compiler/syntax errors for my script?

  • For v1 framework include this in your Info.plist file:
    <key>PlexPluginDebug</key>
    <string>1</string>

    For v2 framework include this in your Info.plist file:
    <key>PlexPluginConsoleLogging</key>
    <string>1</string>

  • Then run PMS from Terminal:
    /usr/bin/killall Plex\ Media\ Server
    
    ~/Library/Application\ Support/Plex/Plex\ Media\ Server.app/Contents/MacOS/Plex\ Media\ Server woof

    or check the Console for plugin output.


View Postndaversa, on 16 September 2010 - 05:35 PM, said:

4. Where can I find what commands can be made to the Plex Media Server (easiest way considering there is currently no documentation).

Not sure what you meant with this...?

Tip: have a look at existing plugins (Github repo).
0

#3 User is offline   ndaversa 

  • Member
  • PipPip
  • Group: Members
  • Posts: 18
  • Joined: 29-April 10

Posted 16 September 2010 - 07:14 PM

Thanks for the quick response.

To rephrase the last question...

I have seen some other scanners, eg. EyeTV. I see the calls to Media.Episode() there, wanted to know if that is documented anywhere.

Thanks
ND

View Postsander1, on 16 September 2010 - 07:04 PM, said:

Hi ND!


Although the docs may not be 100% complete and are written for the v1 framework, there's a lot of info to find there already (v2 framework changes are very small, so the docs are still very usable):
http://dev.plexapp.com/docs/
http://wiki.plexapp....gin_development



Before starting on RAR stuff, have a look at this topic: http://forums.plexap...und-for-plex-9/



Plugin bundles (bundle info) are saved in ~/Library/Application Support/Plex Media Server/Plug-ins



For v1 framework:
from PMS import *

For v2 framework: nothing, this is done automatically



  • For v1 framework include this in your Info.plist file:
    <key>PlexPluginDebug</key>
    <string>1</string>

    For v2 framework include this in your Info.plist file:
    <key>PlexPluginConsoleLogging</key>
    <string>1</string>

  • Then run PMS from Terminal:
    /usr/bin/killall Plex\ Media\ Server
    
    ~/Library/Application\ Support/Plex/Plex\ Media\ Server.app/Contents/MacOS/Plex\ Media\ Server woof

    or check the Console for plugin output.



Not sure what you meant with this...?

Tip: have a look at existing plugins (Github repo).

0

#4 User is offline   RomanTPA 

  • Member
  • PipPip
  • Group: Members
  • Posts: 23
  • Joined: 11-October 10

Posted 12 October 2010 - 12:16 PM

i know python basics and want to take a shot at making a plug in.
where could i find some sample code for a plug in for website that streams movies or uses flash?

Thank You
RK
0

#5 User is offline   Jonny Wray 

  • Dedicated Member
  • PipPipPip
  • Group: Castle Keeper
  • Posts: 1,322
  • Joined: 27-February 09
  • Gender:Male
  • Location:Oxford

Posted 12 October 2010 - 03:23 PM

All the existing plugin code is available on github. One repository per plugin:

http://github.com/plexinc-plugins

Jonny

View PostRomanTPA, on 12 October 2010 - 12:16 PM, said:

i know python basics and want to take a shot at making a plug in.
where could i find some sample code for a plug in for website that streams movies or uses flash?

Thank You
RK

0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users