Changeset 39581
- Timestamp:
- 01/01/17 18:02:44 (7 years ago)
- Location:
- titan/plugins/tithek
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
titan/plugins/tithek/tithek.h
r39576 r39581 1156 1156 } 1157 1157 1158 int showinfo(struct skin* listbox, char* title, char* link, char* pic, char* localname, char* menutitle, int flag) 1159 { 1160 int ret = 1; 1161 char* tmpstr = NULL; 1162 tmpstr = ostrcat(tmpstr, title, 1, 0); 1163 tmpstr = ostrcat(tmpstr, "#", 1, 0); 1164 tmpstr = ostrcat(tmpstr, link, 1, 0); 1165 tmpstr = ostrcat(tmpstr, "#", 1, 0); 1166 tmpstr = ostrcat(tmpstr, pic, 1, 0); 1167 tmpstr = ostrcat(tmpstr, "#", 1, 0); 1168 tmpstr = ostrcat(tmpstr, localname, 1, 0); 1169 tmpstr = ostrcat(tmpstr, "#", 1, 0); 1170 tmpstr = ostrcat(tmpstr, menutitle, 1, 0); 1171 tmpstr = ostrcat(tmpstr, "#", 1, 0); 1172 tmpstr = ostrcat(tmpstr, oitoa(flag), 1, 1); 1173 // tithek security 1174 // tmpstr = string_replace_all("http://atemio.dyndns.tv/", "http://imageshack.us/md/up/grd/", tmpstr, 1); 1175 tmpstr = ostrcat(tmpstr, "\n", 1, 0); 1176 1177 char* savefile = ostrcat("/tmp/tithek/infomenu.list", NULL, 0, 0); 1178 1179 writesys(savefile, tmpstr, 0); 1180 free(tmpstr), tmpstr = NULL; 1181 1182 if(file_exist(savefile)) 1183 { 1184 struct tithek* tnode = (struct tithek*)listbox->select->handle; 1185 createtithek(tnode, tnode->title, savefile, tnode->pic, tnode->localname, tnode->menutitle, tnode->flag); 1186 ret = 0; 1187 } 1188 1189 return ret; 1190 } 1191 1158 1192 void cacheplay(char* link, char* filename, int flag) 1159 1193 { … … 2417 2451 } 2418 2452 } 2453 else if(rcret == getrcconfigint("rcinfo", NULL)) 2454 { 2455 if(listbox->select != NULL && listbox->select->handle != NULL) 2456 { 2457 if(showinfo(listbox, ((struct tithek*)listbox->select->handle)->title, ((struct tithek*)listbox->select->handle)->link, ((struct tithek*)listbox->select->handle)->pic, ((struct tithek*)listbox->select->handle)->localname, ((struct tithek*)listbox->select->handle)->menutitle, ((struct tithek*)listbox->select->handle)->flag) == 0) 2458 if(screenlistbox(grid, listbox, countlabel, title, titheklink, &pagecount, &tithekexit, &oaktpage, &oaktline, &ogridcol, 0, 0) == 0) break; 2459 } 2460 2461 } 2419 2462 // else if(rcret == getrcconfigint("rcyellow", NULL) && ostrcmp(title, _("Tithek - Mainmenu - Favoriten")) == 0) 2420 2463 else if(rcret == getrcconfigint("rcyellow", NULL) && ostrstr(title, _("Tithek - Mainmenu - Favoriten")) != NULL) -
titan/plugins/tithek/tithek_global.h
r39576 r39581 786 786 drawscreen(load, 0, 0); 787 787 788 char* titheklocalfile = ostrcat("/tmp/tithek/mainmenu.local.list", NULL, 0, 0); 789 788 790 if(flag == 1) 789 791 { … … 828 830 system(cmd); 829 831 free(cmd), cmd = NULL; 830 } 831 832 cmd = ostrcat("ls -1 ", path, 0, 0); 833 cmd = ostrcat(cmd, "/*.sh", 1, 0); 834 835 free(path), path = NULL; 836 tmpstr1 = command("ls -1 /mnt/parser/*.sh"); 837 tmpstr2 = command(cmd); 838 free(cmd), cmd = NULL; 839 tmpstr = ostrcat(tmpstr1, "\n", 0, 0); 840 tmpstr = ostrcat(tmpstr, tmpstr2, 1, 0); 841 842 int count = 0, i = 0; 843 struct splitstr* ret1 = NULL; 844 ret1 = strsplit(tmpstr, "\n", &count); 845 846 int max = count; 847 for(i = 0; i < max; i++) 848 { 849 if(file_exist(ret1[i].part) && cmpfilenameext(ret1[i].part, ".sh") == 0) 832 // } 833 834 cmd = ostrcat("ls -1 ", path, 0, 0); 835 cmd = ostrcat(cmd, "/*.sh", 1, 0); 836 837 free(path), path = NULL; 838 tmpstr1 = command("ls -1 /mnt/parser/*.sh"); 839 tmpstr2 = command(cmd); 840 free(cmd), cmd = NULL; 841 tmpstr = ostrcat(tmpstr1, "\n", 0, 0); 842 tmpstr = ostrcat(tmpstr, tmpstr2, 1, 0); 843 844 int count = 0, i = 0; 845 struct splitstr* ret1 = NULL; 846 ret1 = strsplit(tmpstr, "\n", &count); 847 848 int max = count; 849 for(i = 0; i < max; i++) 850 850 { 851 cmd = ostrcat(ret1[i].part, " ", 0, 0); 852 cmd = ostrcat(cmd, ret1[i].part, 1, 0); 853 cmd = ostrcat(cmd, " init", 1, 0); 854 line = command(cmd); 855 debug(99, "add main menuentry: %s", line); 856 writesys(tithekfile, line, 3); 857 free(cmd), cmd = NULL; 858 free(line), line = NULL; 851 if(file_exist(ret1[i].part) && cmpfilenameext(ret1[i].part, ".sh") == 0) 852 { 853 cmd = ostrcat(ret1[i].part, " ", 0, 0); 854 cmd = ostrcat(cmd, ret1[i].part, 1, 0); 855 cmd = ostrcat(cmd, " init", 1, 0); 856 line = command(cmd); 857 debug(99, "add main menuentry: %s", line); 858 writesys(titheklocalfile, line, 3); 859 free(cmd), cmd = NULL; 860 free(line), line = NULL; 861 } 859 862 } 860 } 861 free(ret1), ret1 = NULL; 862 free(tmpstr), tmpstr = NULL; 863 free(tmpstr1), tmpstr1 = NULL; 864 free(tmpstr2), tmpstr2 = NULL; 863 free(ret1), ret1 = NULL; 864 free(tmpstr), tmpstr = NULL; 865 free(tmpstr1), tmpstr1 = NULL; 866 free(tmpstr2), tmpstr2 = NULL; 867 } 868 869 line = readfiletomem(titheklocalfile, 1); 870 free(titheklocalfile), titheklocalfile = NULL; 871 writesys(tithekfile, line, 3); 872 865 873 clearscreen(load); 866 874 } 875 867 876 } 868 877
Note: See TracChangeset
for help on using the changeset viewer.