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"; |
---|
8 | char pluginpic[] = "%pluginpath%/tmdb/plugin.png"; |
---|
9 | |
---|
10 | int pluginaktiv = 0; |
---|
11 | int pluginversion = PLUGINVERSION; |
---|
12 | struct skin* pluginmenu = NULL; |
---|
13 | int pluginflag = 1; //don't show the plugin in pluginmanager |
---|
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 | |
---|
27 | child = checkscreennode(mainmenu, "tmdb"); |
---|
28 | if(child != NULL) |
---|
29 | changeinput(child, "start"); |
---|
30 | |
---|
31 | pluginmenu = child; |
---|
32 | tmpstr = createpluginpath("/tmdb/skin.xml", 0); |
---|
33 | readscreen(tmpstr, 201, 1); |
---|
34 | free(tmpstr); tmpstr = NULL; |
---|
35 | debug(10, "TMDb Plugin loadet !!!"); |
---|
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 | { |
---|
49 | screentmdb(NULL, NULL, 0, NULL, NULL); |
---|
50 | } |
---|