Changeset 28993 for titan/titan


Ignore:
Timestamp:
05/14/14 19:51:08 (10 years ago)
Author:
obi
Message:

[mipsel] add convert function transponder/satellites from e2

Location:
titan/titan
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • titan/titan/global.h

    r28780 r28993  
    18161816                        }
    18171817
     1818#ifdef SH4
     1819                        if(ostrcmp("createsettings_dvbs", child->name) == 0) child->locked = 1;
     1820                        if(ostrcmp("createsettings_dvbc", child->name) == 0) child->locked = 1;
     1821                        if(ostrcmp("createsettings_dvbt", child->name) == 0) child->locked = 1;
     1822                        if(ostrcmp("createsettings_all", child->name) == 0) child->locked = 1;
     1823#endif
    18181824                        if(ostrcmp("savesettings", child->name) == 0) child->locked = tmpflag;
    18191825                        else if(ostrcmp("scartrecorder", child->name) == 0) child->locked = tmpflag;
     
    70307036        int incount = 0;
    70317037       
    7032         system("rm -rf /convert*");
     7038        system("rm -rf /tmp/convert*");
    70337039
    70347040        if(flag == 0)
    70357041        {
    7036                 system("rm -rf /transponder.sat");
    7037                 system("rm -rf /satellites.sat");
     7042                system("rm -rf /tmp/transponder.sat");
     7043                system("rm -rf /tmp/satellites.sat");
    70387044                start = ostrcat("<sat ", NULL, 0, 0);
    70397045                end = ostrcat("</sat>", NULL, 0, 0);
    70407046                filename = ostrcat("/var/etc/tuxbox/satellites.xml", NULL, 0, 0);
    7041                 transponderfile = ostrcat("/transponder.sat", NULL, 0, 0);
    7042                 satfile = ostrcat("/satellites.sat", NULL, 0, 0);
     7047                transponderfile = ostrcat("/tmp/transponder.sat", NULL, 0, 0);
     7048                satfile = ostrcat("/tmp/satellites.sat", NULL, 0, 0);
    70437049                fetype = ostrcat("0", NULL, 0, 0);
    70447050        }
    70457051        else if(flag == 1)
    70467052        {
    7047                 system("rm -rf /transponder.cable");
    7048                 system("rm -rf /satellites.cable");
     7053                system("rm -rf /tmp/transponder.cable");
     7054                system("rm -rf /tmp/satellites.cable");
    70497055                start = ostrcat("<cable ", NULL, 0, 0);
    70507056                end = ostrcat("</cable>", NULL, 0, 0);
    70517057                filename = ostrcat("/var/etc/tuxbox/cables.xml", NULL, 0, 0);
    7052                 transponderfile = ostrcat("/transponder.cable", NULL, 0, 0);
    7053                 satfile = ostrcat("/satellites.cable", NULL, 0, 0);
     7058                transponderfile = ostrcat("/tmp/transponder.cable", NULL, 0, 0);
     7059                satfile = ostrcat("/tmp/satellites.cable", NULL, 0, 0);
    70547060                fetype = ostrcat("1", NULL, 0, 0);
    70557061                incount = 5000;
     
    70577063        else if(flag == 2)
    70587064        {
    7059                 system("rm -rf /transponder.ter");
    7060                 system("rm -rf /satellites.ter");
     7065                system("rm -rf /tmp/transponder.ter");
     7066                system("rm -rf /tmp/satellites.ter");
    70617067                start = ostrcat("<terrestrial ", NULL, 0, 0);
    70627068                end = ostrcat("</terrestrial>", NULL, 0, 0);
    70637069                filename = ostrcat("/var/etc/tuxbox/terrestrial.xml", NULL, 0, 0);
    7064                 transponderfile = ostrcat("/transponder.ter", NULL, 0, 0);
    7065                 satfile = ostrcat("/satellites.ter", NULL, 0, 0);
     7070                transponderfile = ostrcat("/tmp/transponder.ter", NULL, 0, 0);
     7071                satfile = ostrcat("/tmp/satellites.ter", NULL, 0, 0);
    70667072                fetype = ostrcat("2", NULL, 0, 0);
    70677073                incount = 10000;
     
    70707076        buf = readfiletomem(filename, 1);
    70717077
    7072         writesys("/convert.log", buf, 1);
     7078        writesys("/mnt/logs/convert.log", buf, 1);
    70737079       
    70747080        while(ostrstr(buf, start) != NULL)
     
    71587164                buf = string_replace(tmpstr2, NULL, buf, 1);
    71597165       
    7160                 outfile = ostrcat("/convert.", oitoa(incount), 0, 1);
     7166                outfile = ostrcat("/tmp/convert.", oitoa(incount), 0, 1);
    71617167                outfile = ostrcat(outfile, ".log", 1, 0);       
    71627168        //      writesys(outfile, buf, 2);
    7163                 writesys("/convert.log", buf, 3);
     7169                writesys("/mnt/logs/convert.log", buf, 3);
    71647170       
    71657171                writesys(transponderfile, line, 2);
  • titan/titan/menu.h

    r28782 r28993  
    661661                screenscanconfig(3);
    662662        }
     663        else if(ostrcmp("createsettings_dvbs", menuentry->name) == 0)
     664        {
     665                if(check == 1) return 0;
     666                convertsettings(0);
     667                system("cp -a /tmp/satellites.sat /mnt/settings/satellites
     668                system("cp -a /tmp/transponder.sat /mnt/settings/transponder
     669                system("sync"
     670                system("init 6");
     671        }
     672        else if(ostrcmp("createsettings_dvbc", menuentry->name) == 0)
     673        {
     674                if(check == 1) return 0;
     675                convertsettings(1);
     676                system("cp -a /tmp/satellites.cable /mnt/settings/satellites
     677                system("cp -a /tmp/transponder.cable /mnt/settings/transponder
     678                system("sync"
     679                system("init 6");
     680        }
     681        else if(ostrcmp("createsettings_dvbt", menuentry->name) == 0)
     682        {
     683                if(check == 1) return 0;
     684                convertsettings(2);
     685                system("cp -a /tmp/satellites.ter /mnt/settings/satellites
     686                system("cp -a /tmp/transponder.ter /mnt/settings/transponder
     687                system("sync"
     688                system("init 6");
     689        }
     690        else if(ostrcmp("createsettings_all", menuentry->name) == 0)
     691        {
     692                if(check == 1) return 0;
     693                convertsettings(0);
     694                convertsettings(1);
     695                convertsettings(2);
     696                system("cp -a /tmp/satellites.sat /mnt/settings/satellites
     697                system("cp -a /tmp/transponder.sat /mnt/settings/transponder
     698
     699                system("cat /tmp/satellites.cable >> /mnt/settings/satellites
     700                system("cat /tmp/transponder.cable >> /mnt/settings/transponder
     701
     702                system("cat /tmp/satellites.ter >> /mnt/settings/satellites
     703                system("cat /tmp/transponder.ter >> /mnt/settings/transponder
     704
     705                system("sync"
     706                system("init 6");
     707        }
    663708        else if(ostrcmp("autosearch", menuentry->name) == 0)
    664709        {
Note: See TracChangeset for help on using the changeset viewer.