sqlite or other way?

Hi all,



I’d like to use a table for my plugin. Was thinking of:

Table: Person

<br />
handle   |   fullname      |   status   |   capability<br />
-------------------------------------------------------<br />
jjans    |   Jan Jansen    |   online   |   video<br />
ttijs    |   Theo Tijs     |   dnd      |   video<br />
mgrolsch |   Marie Grolsch |   offline  |   none<br />



so that in the plugin directory the fullname is being displayed as title.
When e.g. "Jan Jansen" is being clicked, the plugin finds the handle "jjans" from the table and does an action with the handle and not the fullname.

I think this is possible with sqlite, but I understand that there are (still) some problems with PMS and sqlit. Is this correct?
Check this [link](http://forums.plexapp.com/index.php/topic/22686-database-module/page__p__140508__hl__database__fromsearch__1#entry140508)

Any idea how to solve it or approach my thought from another direction?

thanks,
oortmanp

Hi!

Looking at the example data, you could probably just as easy use a Dict. Be sure to check out the changes regarding Dicts in version 2 of the framework.



Okay, actually I don't really get it

to create a dict:
dictname[key] = value
so e.g.
user[sander1] = Sander

But how can I put more than 1 value in 1 key?
user[sander1] = (Sander, AWAY, True, False)

And if that is possible, how can I retrieve for example the status (AWAY) from User "sander1"?

These might be basic questions, but I really don't know how to... :huh:

thanks,
oortmanp

user[sander1][0]=Sander

user[sander1][1]=AWAY


Thanks,

I also found out that .append should be possible

user = dict()
user[sander1] = ["Sander"]
user[sander1].append("AWAY")

or

user[sander1] = ["Sander", "AWAY", "..."]

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