1 | #ifndef MC_VIDEOPLAYER_SETTINGS_H |
---|
2 | #define MC_VIDEOPLAYER_SETTINGS_H |
---|
3 | |
---|
4 | void 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* autoscan = getscreennode(mc_videoplayer_settings, "autoscan"); |
---|
14 | struct skin* mediadb = getscreennode(mc_videoplayer_settings, "mediadb"); |
---|
15 | struct skin* mediadbscandelall = getscreennode(mc_videoplayer_settings, "mediadbscandelall"); |
---|
16 | struct skin* mediadbscandelnotfound = getscreennode(mc_videoplayer_settings, "mediadbscandelnotfound"); |
---|
17 | struct skin* autostart_playlist = getscreennode(mc_videoplayer_settings, "autostart_playlist"); |
---|
18 | |
---|
19 | addchoicebox(dirsort, "0", _("alpha")); |
---|
20 | addchoicebox(dirsort, "1", _("reverse alpha")); |
---|
21 | addchoicebox(dirsort, "2", _("size")); |
---|
22 | addchoicebox(dirsort, "3", _("reverse size")); |
---|
23 | addchoicebox(dirsort, "4", _("date")); |
---|
24 | addchoicebox(dirsort, "5", _("reverse date")); |
---|
25 | setchoiceboxselection(dirsort, getconfig("mc_vp_dirsort", NULL)); |
---|
26 | |
---|
27 | addchoicebox(view, "0", _("fast")); |
---|
28 | addchoicebox(view, "1", _("big")); |
---|
29 | addchoicebox(view, "2", _("cover")); |
---|
30 | addchoicebox(view, "3", _("default")); |
---|
31 | addchoicebox(view, "4", _("details")); |
---|
32 | addchoicebox(view, "5", _("fullcover")); |
---|
33 | setchoiceboxselection(view, getconfig("mc_vp_view", NULL)); |
---|
34 | |
---|
35 | addchoicebox(autostart_playlist, "0", _("no")); |
---|
36 | addchoicebox(autostart_playlist, "1", _("yes")); |
---|
37 | setchoiceboxselection(autostart_playlist, getconfig("mc_vp_autostart_playlist", NULL)); |
---|
38 | |
---|
39 | addchoicebox(autoscan, "0", _("no")); |
---|
40 | addchoicebox(autoscan, "1", _("yes")); |
---|
41 | setchoiceboxselection(autoscan, getconfig("mc_vp_autoscan", NULL)); |
---|
42 | |
---|
43 | system("ls -al /media/net ; ls -al /media/usb"); |
---|
44 | |
---|
45 | addchoicebox(mediadb, "/var/swap", "/var/swap"); |
---|
46 | |
---|
47 | char* nfs = command("cat /proc/mounts | grep nfs | awk '{print $2}'"); |
---|
48 | debug(50, "[mc_imdb_sync] imdb_directory nfs: %s", nfs); |
---|
49 | addchoicebox(mediadb, nfs, nfs); |
---|
50 | |
---|
51 | char* cifs = command("cat /proc/mounts | grep cifs | awk '{print $2}'"); |
---|
52 | debug(50, "[mc_imdb_sync] imdb_directory cifs: %s", cifs); |
---|
53 | addchoicebox(mediadb, cifs, cifs); |
---|
54 | |
---|
55 | char* vfat = command("cat /proc/mounts | grep vfat | awk '{print $2}'"); |
---|
56 | debug(50, "[mc_imdb_sync] imdb_directory vfat: %s", vfat); |
---|
57 | addchoicebox(mediadb, vfat, vfat); |
---|
58 | |
---|
59 | char* ntfs3g = command("cat /proc/mounts | grep ntfs-3g | awk '{print $2}'"); |
---|
60 | debug(50, "[mc_imdb_sync] imdb_directory ntfs-3g: %s", ntfs3g); |
---|
61 | addchoicebox(mediadb, ntfs3g, ntfs3g); |
---|
62 | |
---|
63 | char* ntfsmount = command("cat /proc/mounts | grep ntfsmount | awk '{print $2}'"); |
---|
64 | debug(50, "[mc_imdb_sync] imdb_directory ntfsmount: %s", ntfsmount); |
---|
65 | addchoicebox(mediadb, ntfsmount, ntfsmount); |
---|
66 | |
---|
67 | char* jfs = command("cat /proc/mounts | grep jfs | awk '{print $2}'"); |
---|
68 | debug(50, "[mc_imdb_sync] imdb_directory jfs: %s", jfs); |
---|
69 | addchoicebox(mediadb, jfs, jfs); |
---|
70 | |
---|
71 | char* ext2 = command("cat /proc/mounts | grep ext2 | awk '{print $2}'"); |
---|
72 | debug(50, "[mc_imdb_sync] imdb_directory ext2: %s", ext2); |
---|
73 | addchoicebox(mediadb, ext2, ext2); |
---|
74 | |
---|
75 | char* ext3 = command("cat /proc/mounts | grep ext3 | awk '{print $2}'"); |
---|
76 | debug(50, "[mc_imdb_sync] imdb_directory ext3: %s", ext3); |
---|
77 | addchoicebox(mediadb, ext3, ext3); |
---|
78 | |
---|
79 | setchoiceboxselection(mediadb, getconfig("mc_vp_mediadb", NULL)); |
---|
80 | |
---|
81 | addchoicebox(mediadbscandelall, "0", _("no")); |
---|
82 | addchoicebox(mediadbscandelall, "1", _("yes")); |
---|
83 | setchoiceboxselection(mediadbscandelall, getconfig("mc_vp_mediadbscandelall", NULL)); |
---|
84 | |
---|
85 | addchoicebox(mediadbscandelnotfound, "0", _("no")); |
---|
86 | addchoicebox(mediadbscandelnotfound, "1", _("yes")); |
---|
87 | setchoiceboxselection(mediadbscandelnotfound, getconfig("mc_vp_mediadbscandelnotfound", NULL)); |
---|
88 | |
---|
89 | drawscreen(mc_videoplayer_settings, 0); |
---|
90 | addscreenrc(mc_videoplayer_settings, listbox); |
---|
91 | |
---|
92 | tmp = listbox->select; |
---|
93 | while(1) |
---|
94 | { |
---|
95 | addscreenrc(mc_videoplayer_settings, tmp); |
---|
96 | rcret = waitrc(mc_videoplayer_settings, 0, 0); |
---|
97 | tmp = listbox->select; |
---|
98 | |
---|
99 | if(rcret == getrcconfigint("rcexit", NULL)) break; |
---|
100 | if(rcret == getrcconfigint("rcok", NULL)) |
---|
101 | { |
---|
102 | addconfigscreencheck("mc_vp_dirsort", dirsort, NULL); |
---|
103 | addconfigscreencheck("mc_vp_view", view, NULL); |
---|
104 | |
---|
105 | addconfigscreencheck("mc_vp_autoscan", autoscan, NULL); |
---|
106 | addconfigscreencheck("mc_vp_mediadb", mediadb, NULL); |
---|
107 | addconfigscreencheck("mc_vp_mediadbscandelall", mediadbscandelall, NULL); |
---|
108 | addconfigscreencheck("mc_vp_mediadbscandelnotfound", mediadbscandelnotfound, NULL); |
---|
109 | |
---|
110 | addconfigscreencheck("vp_autostart_playlist", autostart_playlist, NULL); |
---|
111 | break; |
---|
112 | } |
---|
113 | else if(rcret == getrcconfigint("rcred", NULL)) |
---|
114 | { |
---|
115 | struct skin* screen = getscreen("networkmenu"); |
---|
116 | menu(screen); |
---|
117 | drawscreen(mc_videoplayer_settings, 0); |
---|
118 | } |
---|
119 | } |
---|
120 | |
---|
121 | delownerrc(mc_videoplayer_settings); |
---|
122 | clearscreen(mc_videoplayer_settings); |
---|
123 | free(ext2); |
---|
124 | free(ext3); |
---|
125 | free(vfat); |
---|
126 | free(ntfsmount); |
---|
127 | free(ntfs3g); |
---|
128 | free(cifs); |
---|
129 | free(nfs); |
---|
130 | } |
---|
131 | |
---|
132 | #endif |
---|