source: titan/plugins/mc/mc_videoplayer_settings.h @ 15606

Last change on this file since 15606 was 15606, checked in by obi, 8 years ago

[titan] fix mc enable view modis

File size: 4.0 KB
Line 
1#ifndef MC_VIDEOPLAYER_SETTINGS_H
2#define MC_VIDEOPLAYER_SETTINGS_H
3
4void screenmc_videoplayer_settings()
5{
6        int rcret = 0;
7        struct skin* tmp = NULL;
8
9        struct skin* mc_videoplayer_settings = getscreen("mc_videoplayer_settings");
10        struct skin* listbox = getscreennode(mc_videoplayer_settings, "listbox");
11        struct skin* dirsort = getscreennode(mc_videoplayer_settings, "sort");
12        struct skin* view = getscreennode(mc_videoplayer_settings, "view");
13        struct skin* imdb_directory = getscreennode(mc_videoplayer_settings, "imdb_directory");
14        struct skin* vp_autostart_playlist = getscreennode(mc_videoplayer_settings, "autostart_playlist");
15
16        addchoicebox(dirsort, "0", _("alpha")); 
17        addchoicebox(dirsort, "1", _("reverse alpha")); 
18        addchoicebox(dirsort, "2", _("size"));
19        addchoicebox(dirsort, "3", _("reverse size"));
20        addchoicebox(dirsort, "4", _("date"));
21        addchoicebox(dirsort, "5", _("reverse date"));
22        setchoiceboxselection(dirsort, getconfig("dirsort", NULL));
23
24        addchoicebox(view, "0", _("fast"));
25        addchoicebox(view, "1", _("big"));     
26        addchoicebox(view, "2", _("cover"));   
27        addchoicebox(view, "3", _("default"));
28        addchoicebox(view, "4", _("details"));
29        addchoicebox(view, "5", _("fullcover"));
30        setchoiceboxselection(view, getconfig("vp_view", NULL));
31
32        addchoicebox(vp_autostart_playlist, "0", _("no"));     
33        addchoicebox(vp_autostart_playlist, "1", _("yes"));
34        setchoiceboxselection(vp_autostart_playlist, getconfig("vp_autostart_playlist", NULL));
35
36        system("ls -al /media/net ; ls -al /media/usb");
37
38        addchoicebox(imdb_directory, "/var/swap", "/var/swap");
39
40        char* nfs = command("cat /proc/mounts | grep nfs | awk '{print $2}'");
41        debug(50, "[mc_imdb_sync] imdb_directory nfs: %s", nfs);
42        addchoicebox(imdb_directory, nfs, nfs);
43
44        char* cifs = command("cat /proc/mounts | grep cifs | awk '{print $2}'");
45        debug(50, "[mc_imdb_sync] imdb_directory cifs: %s", cifs);
46        addchoicebox(imdb_directory, cifs, cifs);
47
48        char* vfat = command("cat /proc/mounts | grep vfat | awk '{print $2}'");
49        debug(50, "[mc_imdb_sync] imdb_directory vfat: %s", vfat);
50        addchoicebox(imdb_directory, vfat, vfat);
51
52        char* ntfs3g = command("cat /proc/mounts | grep ntfs-3g | awk '{print $2}'");
53        debug(50, "[mc_imdb_sync] imdb_directory ntfs-3g: %s", ntfs3g);
54        addchoicebox(imdb_directory, ntfs3g, ntfs3g);
55
56        char* ntfsmount = command("cat /proc/mounts | grep ntfsmount | awk '{print $2}'");     
57        debug(50, "[mc_imdb_sync] imdb_directory ntfsmount: %s", ntfsmount);
58        addchoicebox(imdb_directory, ntfsmount, ntfsmount);
59
60        char* jfs = command("cat /proc/mounts | grep jfs | awk '{print $2}'");
61        debug(50, "[mc_imdb_sync] imdb_directory jfs: %s", jfs);
62        addchoicebox(imdb_directory, jfs, jfs);
63
64        char* ext2 = command("cat /proc/mounts | grep ext2 | awk '{print $2}'");
65        debug(50, "[mc_imdb_sync] imdb_directory ext2: %s", ext2);
66        addchoicebox(imdb_directory, ext2, ext2);
67
68        char* ext3 = command("cat /proc/mounts | grep ext3 | awk '{print $2}'");
69        debug(50, "[mc_imdb_sync] imdb_directory ext3: %s", ext3);
70        addchoicebox(imdb_directory, ext3, ext3);
71
72        setchoiceboxselection(imdb_directory, getconfig("imdb_directory", NULL));
73
74        drawscreen(mc_videoplayer_settings, 0);
75        addscreenrc(mc_videoplayer_settings, listbox);
76
77        tmp = listbox->select;
78        while(1)
79        {
80                addscreenrc(mc_videoplayer_settings, tmp);
81                rcret = waitrc(mc_videoplayer_settings, 0, 0);
82                tmp = listbox->select;
83       
84                if(rcret == getrcconfigint("rcexit", NULL)) break;
85                if(rcret == getrcconfigint("rcok", NULL))
86                {
87                        addconfigscreencheck("dirsort", dirsort, NULL);
88                        addconfigscreencheck("vp_view", view, NULL);
89                        addconfigscreencheck("imdb_directory", imdb_directory, NULL);
90                        addconfigscreencheck("vp_autostart_playlist", vp_autostart_playlist, NULL);             
91                        break;
92                }
93                else if(rcret == getrcconfigint("rcred", NULL))
94                {
95                        struct skin* screen = getscreen("networkmenu");
96                        menu(screen);
97                        drawscreen(mc_videoplayer_settings, 0);
98                }
99  }
100
101        delownerrc(mc_videoplayer_settings);
102        clearscreen(mc_videoplayer_settings);
103        free(ext2);
104        free(ext3);
105        free(vfat);
106        free(ntfsmount);
107        free(ntfs3g);
108        free(cifs);
109        free(nfs);
110}
111
112#endif
Note: See TracBrowser for help on using the repository browser.