[15397] | 1 | #include "../titan/struct.h" |
---|
| 2 | #include "../titan/debug.h" |
---|
| 3 | #include "../titan/header.h" |
---|
| 4 | #include "tmdb.h" |
---|
| 5 | |
---|
| 6 | char pluginname[] = "TMDb"; |
---|
| 7 | char plugindesc[] = "Extensions"; |
---|
[16428] | 8 | char pluginpic[] = "%pluginpath%/tmdb/plugin.png"; |
---|
[15397] | 9 | |
---|
| 10 | int pluginaktiv = 0; |
---|
[17097] | 11 | int pluginversion = PLUGINVERSION; |
---|
[15397] | 12 | struct skin* pluginmenu = NULL; |
---|
[25041] | 13 | int pluginflag = 1; //don't show the plugin in pluginmanager |
---|
[15397] | 14 | |
---|
| 15 | //wird beim laden ausgefuehrt |
---|
| 16 | void init(void) |
---|
| 17 | { |
---|
| 18 | pluginaktiv = 1; |
---|
| 19 | char* tmpstr = NULL; |
---|
| 20 | struct skin* mainmenu = getscreen("mainmenu"); |
---|
| 21 | struct skin* listbox = getscreennode(mainmenu, "listbox"); |
---|
| 22 | struct skin* child = NULL; |
---|
| 23 | |
---|
| 24 | if(mainmenu == NULL || listbox == NULL) |
---|
| 25 | return; |
---|
| 26 | |
---|
[23090] | 27 | child = checkscreennode(mainmenu, "tmdb"); |
---|
[15397] | 28 | if(child != NULL) |
---|
| 29 | changeinput(child, "start"); |
---|
| 30 | |
---|
| 31 | pluginmenu = child; |
---|
[24056] | 32 | tmpstr = createpluginpath("/tmdb/skin.xml", 0); |
---|
[15397] | 33 | readscreen(tmpstr, 201, 1); |
---|
| 34 | free(tmpstr); tmpstr = NULL; |
---|
[16428] | 35 | debug(10, "TMDb Plugin loadet !!!"); |
---|
[15397] | 36 | } |
---|
| 37 | |
---|
| 38 | //wird beim entladen ausgefuehrt |
---|
| 39 | void deinit(void) |
---|
| 40 | { |
---|
| 41 | delmarkedscreen(202); |
---|
| 42 | pluginaktiv = 0; |
---|
| 43 | debug(10, "TMDb Plugin removed !!!"); |
---|
| 44 | } |
---|
| 45 | |
---|
| 46 | //wird in der Pluginverwaltung bzw Menue ausfeguehrt |
---|
| 47 | void start(void) |
---|
| 48 | { |
---|
[18683] | 49 | screentmdb(NULL, NULL, 0, NULL, NULL); |
---|
[15397] | 50 | } |
---|