# Missing from the Official Plugin Documentation

**URL:** <https://forums.plex.tv/t/missing-from-the-official-plugin-documentation/47753>\
**Category:** Dev/API Corner\
**Tags:** plugin-dev\
**Created:** [November 24, 2013, 8:22pm UTC](https://forums.plex.tv/t/missing-from-the-official-plugin-documentation/47753 "2013-11-24T20:22:48Z")\
**Posts on this page:** 18\
**Page:** 1

<div class="post-metadata">

**Author:** ![mikedm139](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/mikedm139/32/96909_2.png) [@mikedm139](https://forums.plex.tv/u/mikedm139)\
**Post date:** [November 24, 2013, 8:22pm UTC](https://forums.plex.tv/t/missing-from-the-official-plugin-documentation/47753/1 "2013-11-24T20:22:48Z")

</div>

A few of us have started maintaining a Google Doc with notes regarding stuff that is missing from the existing [Plugin Framework Documentation](http://dev.plexapp.com/docs). Obviously since the docs are one of the major sources of support for Channel Developers, those gaps in the knowledge base can be crippling, especially for people just getting started. The idea was to have the missing details added to the official docs but more-often-than-not documentation takes a back-seat to ongoing development. So, for the time being we decided to share a little extra knowledge with anyone who might be interested and might benefit from it.

&nbsp;

Check it out [here.](http://bit.ly/1iHGWQn)

&nbsp;

We'll try to keep it up to date as new stuff gets added to the framework and we discover other undocumented tidbits. If you have questions about the contents of the google-doc or have found something that you think should be added, feel free to post in this thread.

---

<div class="post-metadata">

**Author:** ![Gerk](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/gerk/32/81980_2.png) [@Gerk](https://forums.plex.tv/u/Gerk)\
**Post date:** [November 24, 2013, 8:35pm UTC](https://forums.plex.tv/t/missing-from-the-official-plugin-documentation/47753/2 "2013-11-24T20:35:53Z")

</div>

Also some of the info in there may be a bit scattered, think of it more like a note pad than any sort of official documentation ;) &nbsp;If you have anything to add to it please feel free to post here as well. &nbsp;There are several of us with write access to that file.

---

<div class="post-metadata">

**Author:** ![dane22](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/dane22/32/4389_2.png) [@dane22](https://forums.plex.tv/u/dane22)\
**Post date:** [November 24, 2013, 8:44pm UTC](https://forums.plex.tv/t/missing-from-the-official-plugin-documentation/47753/3 "2013-11-24T20:44:32Z")

</div>

Nice work guys.....Highly appreciated.

Not sure if this fits the bill or not, since it's not api related, but more database related, but....

Any way....your call

[https://forums.plexapp.com/index.php/topic/86694-sharing-info/?p=501898](https://forums.plexapp.com/index.php/topic/86694-sharing-info/?p=501898)

/T

---

<div class="post-metadata">

**Author:** ![Gerk](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/gerk/32/81980_2.png) [@Gerk](https://forums.plex.tv/u/Gerk)\
**Post date:** [November 24, 2013, 8:45pm UTC](https://forums.plex.tv/t/missing-from-the-official-plugin-documentation/47753/4 "2013-11-24T20:45:50Z")

</div>

Hi Dane

Not really applicable to channel development, but thanks.

---

<div class="post-metadata">

**Author:** ![dane22](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/dane22/32/4389_2.png) [@dane22](https://forums.plex.tv/u/dane22)\
**Post date:** [November 24, 2013, 9:49pm UTC](https://forums.plex.tv/t/missing-from-the-official-plugin-documentation/47753/5 "2013-11-24T21:49:49Z")

</div>

> Not really applicable to channel development, but thanks.

Ack.....Maybe a second doc then?

After all, the more info we get collected into common repositories, the stronger both we and Plex stand.

---

<div class="post-metadata">

**Author:** ![mikedm139](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/mikedm139/32/96909_2.png) [@mikedm139](https://forums.plex.tv/u/mikedm139)\
**Post date:** [November 24, 2013, 9:58pm UTC](https://forums.plex.tv/t/missing-from-the-official-plugin-documentation/47753/6 "2013-11-24T21:58:51Z")

</div>

> Ack.....Maybe a second doc then?  
>   
> After all, the more info we get collected into common repositories, the stronger both we and Plex stand.

Seems like a good idea. If you care to compile your notes in a g-doc (or similar) as a starting point, and post a link in the General Development forum, I'll make sure the thread gets stickied.

---

<div class="post-metadata">

**Author:** ![dane22](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/dane22/32/4389_2.png) [@dane22](https://forums.plex.tv/u/dane22)\
**Post date:** [November 25, 2013, 12:24am UTC](https://forums.plex.tv/t/missing-from-the-official-plugin-documentation/47753/7 "2013-11-25T00:24:25Z")

</div>

Done

Find it here:

[https://forums.plexapp.com/index.php/topic/87348-undocumented-functionality-and-tips-tricks/?p=506039](https://forums.plexapp.com/index.php/topic/87348-undocumented-functionality-and-tips-tricks/?p=506039)

Best regards

Tommy

---

<div class="post-metadata">

**Author:** ![realriot](https://avatars.discourse-cdn.com/v4/letter/r/919ad9/32.png) [@realriot](https://forums.plex.tv/u/realriot)\
**Post date:** [March 6, 2014, 8:50am UTC](https://forums.plex.tv/t/missing-from-the-official-plugin-documentation/47753/8 "2014-03-06T08:50:21Z")

</div>

Additionally I cannot find anything within the official documents about:&nbsp; **Resource.ContentsOfURLWithFallback**

Perhaps a new entry for the "missing" document?

---

<div class="post-metadata">

**Author:** ![Gerk](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/gerk/32/81980_2.png) [@Gerk](https://forums.plex.tv/u/Gerk)\
**Post date:** [March 6, 2014, 1:07pm UTC](https://forums.plex.tv/t/missing-from-the-official-plugin-documentation/47753/9 "2014-03-06T13:07:06Z")

</div>

It's already in there, there's a section called "Special handling for images"

---

<div class="post-metadata">

**Author:** ![realriot](https://avatars.discourse-cdn.com/v4/letter/r/919ad9/32.png) [@realriot](https://forums.plex.tv/u/realriot)\
**Post date:** [March 6, 2014, 3:46pm UTC](https://forums.plex.tv/t/missing-from-the-official-plugin-documentation/47753/10 "2014-03-06T15:46:51Z")

</div>

Hm, I really cannot find this section within the dev-center, wiki, pdf...

---

<div class="post-metadata">

**Author:** ![dane22](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/dane22/32/4389_2.png) [@dane22](https://forums.plex.tv/u/dane22)\
**Post date:** [March 6, 2014, 9:49pm UTC](https://forums.plex.tv/t/missing-from-the-official-plugin-documentation/47753/11 "2014-03-06T21:49:05Z")

</div>

> Hm, I really cannot find this section within the dev-center, wiki, pdf...

Did you try the link in the first post?

[https://docs.google.com/document/d/1MyhhTsg5xdDD5LRbOZ5x5QxkmEyXv6rB-22Z7tdpy34/edit](https://docs.google.com/document/d/1MyhhTsg5xdDD5LRbOZ5x5QxkmEyXv6rB-22Z7tdpy34/edit)

/T

---

<div class="post-metadata">

**Author:** ![realriot](https://avatars.discourse-cdn.com/v4/letter/r/919ad9/32.png) [@realriot](https://forums.plex.tv/u/realriot)\
**Post date:** [March 7, 2014, 7:06pm UTC](https://forums.plex.tv/t/missing-from-the-official-plugin-documentation/47753/12 "2014-03-07T19:06:30Z")

</div>

Hm works today... Don't know why but I couldn't open it yesterday... :/

---

<div class="post-metadata">

**Author:** ![manfer](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/manfer/32/10663_2.png) [@manfer](https://forums.plex.tv/u/manfer)\
**Post date:** [March 26, 2015, 2:13pm UTC](https://forums.plex.tv/t/missing-from-the-official-plugin-documentation/47753/13 "2015-03-26T14:13:46Z")

</div>

Cache Constants:

```
CACHE_1MINUTE
CACHE_1HOUR
CACHE_1DAY
CACHE_1WEEK
CACHE_1MONTH
```

If I'm not wrong it is not documented anywhere.

---

<div class="post-metadata">

**Author:** ![manfer](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/manfer/32/10663_2.png) [@manfer](https://forums.plex.tv/u/manfer)\
**Post date:** [April 4, 2015, 8:56pm UTC](https://forums.plex.tv/t/missing-from-the-official-plugin-documentation/47753/14 "2015-04-04T20:56:58Z")

</div>

I'm not sure but I haven't been able to find this anywhere either.

To avoid importing the python re module in the channel code it is recommended to use Regex() from the framework to create a compiled pattern. So instead of:

```
import re

testString = “This string is for testing purpose”  
“testing regexp”  
testPattern = ‘(t.\*)\s’

re.search(testPattern, testString).group(1)
```

we should be using:

```
testString = "This string is for testing purpose"
              "testing regexp"
testPattern = Regex('(t.*)\s')

testPattern.search(testString).group(1)
```

But what happens if we need to specify a flag. If we want the dot to match newlines, or if we want to do a multiline search or ignore case. This is what I haven't found anywhere.

The constant for those flags would be:

```
Regex.DOTALL
Regex.IGNORECASE
Regex.MULTILINE
```

And we will use them this way:

```
testString = "This string is for testing purpose"
              "testing regexp"
testPattern = Regex('(t.*)\s', Regex.DOTALL)

testPattern.search(testString).group(1)
```

---

<div class="post-metadata">

**Author:** ![mattrk](https://avatars.discourse-cdn.com/v4/letter/m/4da419/32.png) [@mattrk](https://forums.plex.tv/u/mattrk)\
**Post date:** [June 17, 2015, 5:15am UTC](https://forums.plex.tv/t/missing-from-the-official-plugin-documentation/47753/15 "2015-06-17T05:15:12Z")

</div>

I just discovered that the EpisodeObject metadata object accepts the "content\_rating" argument. This sets the rating that you see for each episode. The content\_rating argument set for a TVShowObject only applies to the entire show and is not propagated to children episodeobjects as expected.

Also, thanks for this document. It's extremely useful and helpful. It's a shame that the Plex devs don't keep better documentation of the API. Then again, it's been years since they touched it or gave it any love. So it's not surprising. I have a feeling one of these days they'll just kill the entire channel API altogether. I mean, a dead API is almost worse than no API. /rant&nbsp;

---

<div class="post-metadata">

**Author:** ![dmstv](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/dmstv/32/10813_2.png) [@dmstv](https://forums.plex.tv/u/dmstv)\
**Post date:** [July 15, 2015, 7:57pm UTC](https://forums.plex.tv/t/missing-from-the-official-plugin-documentation/47753/16 "2015-07-15T19:57:17Z")

</div>

Regarding the TrackObject, it says that it requires ‘ext=mp3’ for the PartObject in the MediaObject. The way I’ve setup TrackObject is by having a Callback that does a Return(url) with the mp3 file. This works in the web client, but not within the the client in Amazon Fire. When I try to add a MediaObject to the TrackObject, it doesn’t work, it seems to just skip through to the next audio file.

---

<div class="post-metadata">

**Author:** ![dane22](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/dane22/32/4389_2.png) [@dane22](https://forums.plex.tv/u/dane22)\
**Post date:** [June 30, 2018, 11:43am UTC](https://forums.plex.tv/t/missing-from-the-official-plugin-documentation/47753/17 "2018-06-30T11:43:20Z")

</div>



---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/plex/original/3X/2/a/2acb9765406f63293d357b4ec509ec39aa28f2ad.png) [@system](https://forums.plex.tv/u/system)\
**Post date:** [December 21, 2019, 12:31am UTC](https://forums.plex.tv/t/missing-from-the-official-plugin-documentation/47753/18 "2019-12-21T00:31:23Z")

</div>

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