Changeset 40191 for titan/plugins
- Timestamp:
- 02/28/17 01:40:07 (7 years ago)
- Location:
- titan/plugins/tithek
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
titan/plugins/tithek/tithek.h
r40187 r40191 557 557 if(ostrcmp(node->filename, "/media/hdd/.tithek/python.tar") == 0 || ostrcmp(node->filename, "/var/swap/.tithek/python.tar") == 0 || ostrcmp(node->filename, "/mnt/.tithek/python.tar") == 0) 558 558 { 559 printf("[tithek] sleep: 10\n");560 sleep( 10);561 printf("[tithek] start Download: %s\n", node->filename);559 printf("[tithek] sleep: 20\n"); 560 sleep(20); 561 printf("[tithek] Download start: %s\n", node->filename); 562 562 } 563 563 564 564 gethttpreal(node->host, node->page, node->port, node->filename, node->auth, NULL, 0, NULL, NULL, node->timeout, 0); 565 printf("[tithek] Download done: %s\n", node->filename); 565 566 566 567 char* cmd = NULL; 567 568 if(ostrcmp(node->filename, "/media/hdd/.tithek/python.tar") == 0) 568 569 { 569 cmd = ostrcat("tar -x vf /media/hdd/.tithek/python.tar -C /media/hdd/.tithek/", NULL, 0, 0);570 cmd = ostrcat("tar -xf /media/hdd/.tithek/python.tar -C /media/hdd/.tithek/", NULL, 0, 0); 570 571 symlink("/media/hdd/.tithek/lib", "/tmp/localhoster/lib"); 571 572 } 572 573 else if(ostrcmp(node->filename, "/var/swap/.tithek/python.tar") == 0) 573 574 { 574 cmd = ostrcat("tar -x vf /var/swap/.tithek/python.tar -C /var/swap/.tithek/", NULL, 0, 0);575 cmd = ostrcat("tar -xf /var/swap/.tithek/python.tar -C /var/swap/.tithek/", NULL, 0, 0); 575 576 symlink("/var/swap/.tithek/lib", "/tmp/localhoster/lib"); 576 577 } 577 578 else if(ostrcmp(node->filename, "/mnt/.tithek/python.tar") == 0) 578 579 { 579 cmd = ostrcat("tar -x vf /mnt/.tithek/python.tar -C /mnt/.tithek/", NULL, 0, 0);580 cmd = ostrcat("tar -xf /mnt/.tithek/python.tar -C /mnt/.tithek/", NULL, 0, 0); 580 581 symlink("/mnt/.tithek/lib", "/tmp/localhoster/lib"); 581 582 } 582 583 else if(ostrcmp(node->filename, "/tmp/python.tar") == 0) 583 cmd = ostrcat("tar -xvf /tmp/python.tar -C /tmp/localhoster/", NULL, 0, 0); 584 { 585 cmd = ostrcat("tar -xf /tmp/python.tar -C /tmp/localhoster/", NULL, 0, 0); 586 printf("[tithek] remove: %s\n", node->filename); 587 unlink(node->filename); 588 } 584 589 585 590 if(cmd != NULL) … … 588 593 system(cmd); 589 594 free(cmd), cmd = NULL; 590 printf("[tithek] remove: %s\n", node->filename);591 unlink(node->filename);592 595 } 593 596 if(tithekrun == 0) -
titan/plugins/tithek/tithek_global.h
r40180 r40191 811 811 gethttp("atemio.dyndns.tv", "/mediathek/parser_free.tar", 80, "/tmp/parser.tar", HTTPAUTH, 5000, NULL, 0); 812 812 813 cmd = ostrcat("tar -x vf /tmp/parser.tar -C ", path, 0, 0);813 cmd = ostrcat("tar -xf /tmp/parser.tar -C ", path, 0, 0); 814 814 system(cmd); 815 815 free(cmd), cmd = NULL; … … 819 819 { 820 820 gethttp("atemio.dyndns.tv", "/mediathek/parser_secret.tar", 80, "/tmp/parser.tar", HTTPAUTH, 5000, NULL, 0); 821 cmd = ostrcat("tar -x vf /tmp/parser.tar -C ", path, 0, 0);821 cmd = ostrcat("tar -xf /tmp/parser.tar -C ", path, 0, 0); 822 822 system(cmd); 823 823 free(cmd), cmd = NULL; … … 826 826 827 827 gethttp("atemio.dyndns.tv", "/mediathek/hoster.tar", 80, "/tmp/hoster.tar", HTTPAUTH, 5000, NULL, 0); 828 cmd = ostrcat("tar -x vf /tmp/hoster.tar -C ", "/tmp/localhoster", 0, 0);828 cmd = ostrcat("tar -xf /tmp/hoster.tar -C ", "/tmp/localhoster", 0, 0); 829 829 system(cmd); 830 830 free(cmd), cmd = NULL; … … 839 839 dnode->port = 80; 840 840 dnode->filename = ostrcat("/tmp/python.tar", NULL, 0, 0); 841 841 842 printf("[tithek] getfreespace start\n"); 843 842 844 if(getfreespace("/mnt") / 1024 > 102400) //100mb 843 845 { … … 866 868 dnode->page = ostrcat("/mediathek/python_full.tar", NULL, 0, 0); 867 869 } 870 printf("[tithek] getfreespace end\n"); 868 871 869 872 dnode->auth = ostrcat(HTTPAUTH, NULL, 0, 0); … … 910 913 cmd = ostrcat(cmd, " init", 1, 0); 911 914 line = command(cmd); 915 line = string_newline(line); 912 916 debug(99, "add main menuentry: %s", line); 913 917 writesys(titheklocalfile, line, 3);
Note: See TracChangeset
for help on using the changeset viewer.