To get my feet wet in creating plug ins for Plex, I decided to start with a simple streaming radio one. I've got the basics down at the moment (Add and delete 'stations', show listing, read stations from RSS feed) but have come across a few snags.
Firstly, just wondering what the procedure is for making changes in the Framework python scripts - as to get where I am I needed to add a couple of functions to the Dict.py class to allow me to retrieve a list of keys and removal of keys. For the removal of keys I thought it best to follow the standard set by the Set function :)
Dict.py changes
<br />
####################################################################################################<br />
<br />
def Keys():<br />
global __dict<br />
return __dict.keys()<br />
<br />
####################################################################################################<br />
<br />
def Delete(key, addToLog=True):<br />
global __dict<br />
global __saveScheduled<br />
Thread.Lock("Framework.Dict", addToLog=False)<br />
del __dict[key]<br />
if not __saveScheduled:<br />
Thread.CreateTimer(5, __save, addToLog=addToLog)<br />
__saveScheduled = True<br />
Thread.Unlock("Framework.Dict", addToLog=False)<br />
<br />
####################################################################################################<br />
[s]Onto the problems I've come across. The first is probably something simple, but I can't seem to find a solution anywhere.
What I'm wanting to do is refresh/reload the current container when an item is selected for deletion. Is this currently possible?[/s]
*EDIT: Found the answer, mental note to use different keywords ([link](http://forums.plexapp.com/index.php/topic/12359-reloading-a-menu/))*
The next question is in regards to the context menu - but I think an earlier thread I read this morning might have answered it for me. I cannot add/change this can I? As it would be better to have the add/delete/edit station commands here imo than where I have them now
And finally, I'm getting some strange behavior with the icon for my plug in. It was fine after I made the first change, but now it is stuck with the old icon no matter how much I change it. And it I change the name of the file the icon disappears completely :S Is there some sort of icon cache I need to clear in order to see the correct, latest icon?
Thanks for the help :D