Changeset 39020 for titan/plugins


Ignore:
Timestamp:
09/25/16 14:58:20 (8 years ago)
Author:
obi
Message:

fix sh4

Location:
titan/plugins/tithek
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • titan/plugins/tithek/tithek.h

    r39018 r39020  
    739739//      amazon_init(titheklink, tithekfile);
    740740//init locale parser
    741         localparser_init(titheklink, tithekfile);
     741        localparser_init(titheklink, tithekfile, flag);
    742742
    743743        delmarkedscreennodes(grid, 1);
  • titan/plugins/tithek/tithek_global.h

    r38997 r39020  
    776776}
    777777
    778 void localparser_init(char* titheklink, char* tithekfile)
     778void localparser_init(char* titheklink, char* tithekfile, int flag)
    779779{
    780780        char* tmpstr = NULL, *tmpstr1 = NULL, *tmpstr2 = NULL, *cmd = NULL, *line = NULL, *path = NULL;
     
    782782        if(ostrcmp("http://atemio.dyndns.tv/mediathek/mainmenu.list", titheklink) == 0)
    783783        {
    784 //              path = createpluginpath("/tithek", 0);
    785 //              path = ostrcat(path, "/parser", 1, 0);
    786784                path = ostrcat("/tmp/localparser", NULL, 0, 0);
    787785
    788                 if(!file_exist("/tmp/localhoster"))
    789                         mkdir("/tmp/localhoster", 0777);
    790                 if(!file_exist("/mnt/parser"))
    791                         mkdir("/mnt/parser", 0777);
    792                 if(!file_exist(path))
    793                         mkdir(path, 0777);
    794 
    795                 unlink("/tmp/parser.tar");
    796                 gethttp("atemio.dyndns.tv", "/mediathek/parser_free.tar", 80, "/tmp/parser.tar", HTTPAUTH, 5000, NULL, 0);
    797 
    798                 cmd = ostrcat("tar -xvf /tmp/parser.tar -C ", path, 0, 0);
    799                 system(cmd);
    800                 free(cmd), cmd = NULL;
    801 
    802                 if(file_exist("/mnt/swapextensions/etc/.codecpack") || file_exist("/var/swap/etc/.codecpack") || file_exist("/var/etc/.codecpack"))
    803                 {
     786                if(flag == 1)
     787                {
     788                        if(!file_exist("/tmp/localhoster"))
     789                                mkdir("/tmp/localhoster", 0777);
     790                        if(!file_exist("/mnt/parser"))
     791                                mkdir("/mnt/parser", 0777);
     792                        if(!file_exist(path))
     793                                mkdir(path, 0777);
     794       
    804795                        unlink("/tmp/parser.tar");
    805                         gethttp("atemio.dyndns.tv", "/mediathek/parser_secret.tar", 80, "/tmp/parser.tar", HTTPAUTH, 5000, NULL, 0);
     796                        gethttp("atemio.dyndns.tv", "/mediathek/parser_free.tar", 80, "/tmp/parser.tar", HTTPAUTH, 5000, NULL, 0);
     797       
    806798                        cmd = ostrcat("tar -xvf /tmp/parser.tar -C ", path, 0, 0);
    807799                        system(cmd);
    808800                        free(cmd), cmd = NULL;
    809                 }
    810 
    811                 unlink("/tmp/hoster.tar");
    812                 gethttp("atemio.dyndns.tv", "/mediathek/hoster.tar", 80, "/tmp/hoster.tar", HTTPAUTH, 5000, NULL, 0);
    813                 cmd = ostrcat("tar -xvf /tmp/hoster.tar -C ", "/tmp/localhoster", 0, 0);
    814                 system(cmd);
    815                 free(cmd), cmd = NULL;
    816 
     801       
     802                        if(file_exist("/mnt/swapextensions/etc/.codecpack") || file_exist("/var/swap/etc/.codecpack") || file_exist("/var/etc/.codecpack"))
     803                        {
     804                                unlink("/tmp/parser.tar");
     805                                gethttp("atemio.dyndns.tv", "/mediathek/parser_secret.tar", 80, "/tmp/parser.tar", HTTPAUTH, 5000, NULL, 0);
     806                                cmd = ostrcat("tar -xvf /tmp/parser.tar -C ", path, 0, 0);
     807                                system(cmd);
     808                                free(cmd), cmd = NULL;
     809                        }
     810       
     811                        unlink("/tmp/hoster.tar");
     812                        gethttp("atemio.dyndns.tv", "/mediathek/hoster.tar", 80, "/tmp/hoster.tar", HTTPAUTH, 5000, NULL, 0);
     813                        cmd = ostrcat("tar -xvf /tmp/hoster.tar -C ", "/tmp/localhoster", 0, 0);
     814                        system(cmd);
     815                        free(cmd), cmd = NULL;
     816                }
    817817                cmd = ostrcat("chmod -R 755 ", path, 0, 0);
    818818                system(cmd);
     
    850850                                cmd = ostrcat(cmd, " init", 1, 0);
    851851                                line = command(cmd);
    852                                 printf("[tithek] add main menuentry: %s\n", line);
    853852                                debug(10, "add main menuentry: %s", line);
    854853                                writesys(tithekfile, line, 3);
  • titan/plugins/tithek/tithek_header.h

    r37471 r39020  
    77void amazon_init(char* titheklink, char* tithekfile);
    88void amazon_deinit();
    9 void localparser_init(char* titheklink, char* tithekfile);
     9void localparser_init(char* titheklink, char* tithekfile, int flag);
    1010int b64dec(char* dest, char* src);
    1111char* localparser_hoster(char* link);
Note: See TracChangeset for help on using the changeset viewer.