# Need help with plugin

**URL:** <https://forums.plex.tv/t/need-help-with-plugin/8943>\
**Category:** Dev/API Corner\
**Tags:** plugin-dev\
**Created:** [April 21, 2011, 3:12pm UTC](https://forums.plex.tv/t/need-help-with-plugin/8943 "2011-04-21T15:12:13Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![41john](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/41john/32/493_2.png) [@41john](https://forums.plex.tv/u/41john)\
**Post date:** [April 21, 2011, 3:12pm UTC](https://forums.plex.tv/t/need-help-with-plugin/8943/1 "2011-04-21T15:12:13Z")

</div>

I’m trying to modify the very old justin TV plugin by adding a favourites section. I’m getting close to getting it to work but need help.  
  
  
  
If you launch the plugin you will see a favourites section, which at the moment goes to my justintv account until I code a preferences section with a variable for others to input there own username. Once the favourite section loads instead of showing all my favourite streams it just shows one of my favourite streams not the entire list. I’m sure its something simple but I’m not great at making plugins having not played with the code much before.

---

<div class="post-metadata">

**Author:** ![pierre1313](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/pierre1313/32/523_2.png) [@pierre1313](https://forums.plex.tv/u/pierre1313)\
**Post date:** [April 26, 2011, 8:23am UTC](https://forums.plex.tv/t/need-help-with-plugin/8943/2 "2011-04-26T08:23:41Z")

</div>

I looked at it and yes you are very close to having it all working. what do you need help with ? it seems it’s all there … almost 🙂

---

<div class="post-metadata">

**Author:** ![41john](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/41john/32/493_2.png) [@41john](https://forums.plex.tv/u/41john)\
**Post date:** [April 26, 2011, 9:40am UTC](https://forums.plex.tv/t/need-help-with-plugin/8943/3 "2011-04-26T09:40:10Z")

</div>

> [@](#):
>
> I looked at it and yes you are very close to having it all working. what do you need help with ? it seems it's all there .... almost :-)

  
  
I need help making it list all of my favourites and not just the first one in the list.

---

<div class="post-metadata">

**Author:** ![pierre1313](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/pierre1313/32/523_2.png) [@pierre1313](https://forums.plex.tv/u/pierre1313)\
**Post date:** [April 26, 2011, 9:50am UTC](https://forums.plex.tv/t/need-help-with-plugin/8943/4 "2011-04-26T09:50:04Z")

</div>

That’s actually the very easy part : 2 spaces !!  
  
  
  
on line 192, you have a wrong indent, your “return dir” is too far to the right unindent it and it all works …

---

<div class="post-metadata">

**Author:** ![pierre1313](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/pierre1313/32/523_2.png) [@pierre1313](https://forums.plex.tv/u/pierre1313)\
**Post date:** [April 26, 2011, 10:05am UTC](https://forums.plex.tv/t/need-help-with-plugin/8943/5 "2011-04-26T10:05:41Z")

</div>

Here,  
  
  
  
I have taken the liberty to update your plugin to the v2 Framework (minor changes mainly in the .plist file and at the top of the .py) but the way of the future.  
  
I also includes a simple Preference menu with a selectable username  
  
and changed a minor coding thing (testing for an empty media container can be done by using len(dir) == 0)  
  
  
  
Great job otherwise, keep at it we need a lot of plugin people …  
  
  
  
thanks a lot for you efforts  
  
  
  
[Justintv.bundle.zip](https://global.discourse-cdn.com/plex/original/3X/2/6/26d1d7ac244329e05cd964b9132b5964098ebe13.zip) (211 KB)  
  
  
  
ps: if you wanted to start a new plugin you could use the plugin kickstarter :   
  
  
  
[http://dev.plexapp.com/tools/plugin\_kickstart/](http://dev.plexapp.com/tools/plugin_kickstart/)  
  
  
  
this is what the original justinTV plugin was made with except the new kickstarter now generates v2 plugins

---

<div class="post-metadata">

**Author:** ![41john](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/41john/32/493_2.png) [@41john](https://forums.plex.tv/u/41john)\
**Post date:** [April 26, 2011, 2:43pm UTC](https://forums.plex.tv/t/need-help-with-plugin/8943/6 "2011-04-26T14:43:19Z")

</div>

> [@](#):
>
> Here,  
>   
> I have taken the liberty to update your plugin to the v2 Framework (minor changes mainly in the .plist file and at the top of the .py) but the way of the future.  
> I also includes a simple Preference menu with a selectable username  
> and changed a minor coding thing (testing for an empty media container can be done by using len(dir) == 0)  
>   
> Great job otherwise, keep at it we need a lot of plugin people ...  
>   
> thanks a lot for you efforts  
>   
> [Justintv.bundle.zip](https://forums.plex.tv/uploads/default/original/3X/2/6/26d1d7ac244329e05cd964b9132b5964098ebe13.zip) (211 KB)  
>   
> ps: if you wanted to start a new plugin you could use the plugin kickstarter :   
>   
> http://dev.plexapp.com/tools/plugin\_kickstart/  
>   
> this is what the original justinTV plugin was made with except the new kickstarter now generates v2 plugins

  
  
  
Many thanks for the help, I knew I was close.  
  
I had already put a preference menu in on my own version I had been testing, it wasn't there when I started the thread but had since done it. But thanks for that anyway. I have a few tweaks that I want to do, then I will get it put either on the app store or just on the forum.

---

<div class="post-metadata">

**Author:** ![pierre1313](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/pierre1313/32/523_2.png) [@pierre1313](https://forums.plex.tv/u/pierre1313)\
**Post date:** [April 26, 2011, 4:31pm UTC](https://forums.plex.tv/t/need-help-with-plugin/8943/7 "2011-04-26T16:31:24Z")

</div>

ah! sorry, didn’t mean to step on your toes but I figured a v2 conversion was in order and the Prefs things is not super well documented. I though an example was worth a million words …

---

<div class="post-metadata">

**Author:** ![41john](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/41john/32/493_2.png) [@41john](https://forums.plex.tv/u/41john)\
**Post date:** [April 26, 2011, 6:41pm UTC](https://forums.plex.tv/t/need-help-with-plugin/8943/8 "2011-04-26T18:41:11Z")

</div>

> [@](#):
>
> ah! sorry, didn't mean to step on your toes but I figured a v2 conversion was in order and the Prefs things is not super well documented. I though an example was worth a million words ...

  
  
No toes stepped on. In fact it was great seeing that the code I had implemented was identical to yours and that I must be doing things right.

---

<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 20, 2019, 9:06pm UTC](https://forums.plex.tv/t/need-help-with-plugin/8943/9 "2019-12-20T21:06:05Z")

</div>

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