Need help with plugin

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.

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 :slight_smile:



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

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 …

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 (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.

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.

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