Changeset 36069


Ignore:
Timestamp:
11/05/15 02:16:01 (7 years ago)
Author:
obi
Message:

update scan add delunused functions

Location:
titan/titan
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • titan/titan/global.h

    r36067 r36069  
    74577457void delunusedsat()
    74587458{
     7459        debug(10, "delunusedsat: start");
    74597460        struct sat* node = sat;
    74607461        struct sat* prev = NULL;
     
    74667467               
    74677468                if(prev->scan != 1)
    7468                         delsat(prev);   
    7469         }
    7470 
     7469                        delsat(prev->name);     
     7470        }
     7471        debug(10, "delunusedsat: end");
    74717472}
    74727473
    74737474void delunusedtransponder()
    74747475{
     7476        debug(10, "delunusedtransponder: start");
    74757477        struct transponder* node = transponder;
    74767478        struct transponder* prev = NULL;
     
    74847486                        deltransponder(prev);
    74857487        }
     7488        debug(10, "delunusedtransponder: end");
    74867489}
    74877490
    74887491void delunusedchannel()
    74897492{
     7493        debug(10, "delunusedchannel: start");
    74907494        struct channel* node = channel;
    74917495        struct channel* prev = NULL;
     
    74997503                        delchannel(prev->serviceid, prev->transponderid, 0);
    75007504        }
     7505        debug(10, "delunusedchannel: end");
    75017506}
    75027507
    75037508void delunusedbouquet()
    75047509{
     7510        debug(10, "delunusedbouquet: start");
    75057511        struct mainbouquet* mnode = mainbouquet;
    75067512        struct bouquet* first = NULL;
     
    75217527                mnode = mnode->next;
    75227528        }
     7529        debug(10, "delunusedbouquet: end");
    75237530}
    75247531
    75257532void delunusedepgchannel()
    75267533{
     7534        debug(10, "delunusedepgchannel: start");
    75277535        struct epgscanlist* node = epgscanlist;
    75287536        struct epgscanlist* prev = NULL;
     
    75357543                        delepgscanlist(node->serviceid, node->transponderid);
    75367544        }
     7545        debug(10, "delunusedepgchannel: end");
    75377546}
    75387547
    75397548void delunusedprovider()
    75407549{
     7550        debug(10, "delunusedprovider: start");
    75417551        struct provider* node = provider;
    75427552        struct provider* prev = NULL;
     
    75487558                delprovidernotused(prev);
    75497559        }
     7560        debug(10, "delunusedprovider: end");
    75507561}
    75517562
  • titan/titan/scan.h

    r36067 r36069  
    13931393}
    13941394
    1395 void screenscan(struct transponder* transpondernode, struct skin* mscan, char* tuner, int scantype, int orbitalpos, unsigned int frequency, int inversion, unsigned int symbolrate, int polarization, int fec, int modulation, int rolloff, int pilot, int networkscan, int onlyfree, int clear, int blindscan, int ichangename, int system, int favtype, int emptybouquet, int unusedbouquetchannels, int timeout, int flag)
     1395void screenscan(struct transponder* transpondernode, struct skin* mscan, char* tuner, int scantype, int orbitalpos, unsigned int frequency, int inversion, unsigned int symbolrate, int polarization, int fec, int modulation, int rolloff, int pilot, int networkscan, int onlyfree, int clear, int blindscan, int ichangename, int system, int favtype, int emptybouquet, int unusedbouquetchannels, int unusedsats, int unusedtransponder, int unusedchannels, int unusedprovider, int timeout, int flag)
    13961396{
    13971397        int rcret = 0, tpmax = 0, i = 0, alladded = 0, endmsgshow = 0;
     
    15071507                        {
    15081508                                freechannel(1);
    1509                                 delunusedsat();
    1510                                 delunusedtransponder();
    1511                                 delunusedchannel();
    1512                                 delunusedbouquet();
    1513                                 delunusedepgchannel();
    1514                                 delunusedprovider();
    1515                         }
    1516                 }
     1509                                if(unusedsats == 1) delunusedsat();
     1510                                if(unusedtransponder == 1) delunusedtransponder();
     1511                                if(unusedchannels == 1) delunusedchannel();
     1512                                //if(unusedepgchannel == 1) delunusedepgchannel();
     1513                                if(unusedprovider == 1) delunusedprovider();
     1514                        }
     1515                }
     1516
    15171517                satnode = sat;
    15181518                while(satnode != NULL)
     
    16951695        resetsatscan();
    16961696        drawscreen(load, 0, 0);
    1697   sortchannel();
    1698   sortprovider();
    1699   clearscreen(load);
     1697        sortchannel();
     1698        sortprovider();
     1699        clearscreen(load);
    17001700}
    17011701
     
    18591859        int inetworkscan = -1, ionlyfree = -1, iclear = -1, iblindscan = -1, ichangename = -1;
    18601860        int ifavtype = -1, iemptybouquet = -1, iunusedbouquetchannels = -1;
     1861        int iunusedsats = -1, iunusedtransponder = -1, iunusedchannels = -1, iunusedprovider = -1;
     1862
    18611863        int i = 0, treffer = 0, tunercount = 0;
    18621864       
     
    18951897        struct skin* emptybouquet = getscreennode(scan, "emptybouquet");
    18961898        struct skin* unusedbouquetchannels = getscreennode(scan, "unusedbouquetchannels");
    1897        
     1899        struct skin* unusedsats = getscreennode(scan, "unusedsats");
     1900        struct skin* unusedtransponder = getscreennode(scan, "unusedtransponder");
     1901        struct skin* unusedchannels = getscreennode(scan, "unusedchannels");
     1902        struct skin* unusedprovider = getscreennode(scan, "unusedprovider");
     1903
    18981904        struct skin* b4 = getscreennode(scan, "b4");
    18991905        struct skin* b5 = getscreennode(scan, "b5");
     
    22932299        addchoicebox(unusedbouquetchannels, "1", _("yes"));
    22942300
     2301        //unusedsats
     2302        addchoicebox(unusedsats, "0", _("no"));
     2303        addchoicebox(unusedsats, "1", _("yes"));
     2304
     2305        //unusedtransponder
     2306        addchoicebox(unusedtransponder, "0", _("no"));
     2307        addchoicebox(unusedtransponder, "1", _("yes"));
     2308
     2309        //unusedchannels
     2310        addchoicebox(unusedchannels, "0", _("no"));
     2311        addchoicebox(unusedchannels, "1", _("yes"));
     2312
     2313        //unusedprovider
     2314        addchoicebox(unusedprovider, "0", _("no"));
     2315        addchoicebox(unusedprovider, "1", _("yes"));
     2316
     2317
    22952318        drawscreen(scan, 2, 0);
    22962319        changescantype(scantype->ret, scan, listbox, tuner, sat, id, system, frequency, inversion, symbolrate, polarization, fec, modulation, rolloff, pilot, hp, lp, bandwidth, transmission, guardinterval, hierarchy, b4, b5, flag);
     
    23022325        {
    23032326                addscreenrc(scan, tmp);
     2327
     2328                if(clear->ret != NULL && ostrcmp(clear->ret, "1") == 0)
     2329                {
     2330                        emptybouquet->hidden = NO;
     2331                        unusedbouquetchannels->hidden = NO;
     2332                        unusedsats->hidden = NO;
     2333                        unusedtransponder->hidden = NO;
     2334                        unusedchannels->hidden = NO;
     2335                        unusedprovider->hidden = NO;
     2336                }
     2337                else
     2338                {
     2339                        emptybouquet->hidden = YES;
     2340                        unusedbouquetchannels->hidden = YES;
     2341                        unusedsats->hidden = YES;
     2342                        unusedtransponder->hidden = YES;
     2343                        unusedchannels->hidden = YES;
     2344                        unusedprovider->hidden = YES;
     2345                }
     2346                drawscreen(scan, 0, 0);
     2347
    23042348                rcret = waitrc(scan, 0, 0);
    23052349                tmp = listbox->select;
     
    23352379                if(emptybouquet->ret != NULL) iemptybouquet = atoi(emptybouquet->ret);
    23362380                if(unusedbouquetchannels->ret != NULL) iunusedbouquetchannels = atoi(unusedbouquetchannels->ret);
     2381                if(unusedsats->ret != NULL) iunusedsats = atoi(unusedsats->ret);
     2382                if(unusedtransponder->ret != NULL) iunusedtransponder = atoi(unusedtransponder->ret);
     2383                if(unusedchannels->ret != NULL) iunusedchannels = atoi(unusedchannels->ret);
     2384                if(unusedprovider->ret != NULL) iunusedprovider = atoi(unusedprovider->ret);
    23372385
    23382386                if(rcret == getrcconfigint("rcexit", NULL)) break;
     
    23572405                {
    23582406                        clearscreen(scan);
    2359                         screenscan(tpnode, scan->child, tuner->ret, iscantype, isat, ifrequency, iinversion, isymbolrate, ipolarization, ifec, imodulation, irolloff, ipilot, inetworkscan, ionlyfree, iclear, iblindscan, ichangename, isystem, ifavtype, iemptybouquet, iunusedbouquetchannels, 5000000, flag);
     2407                        screenscan(tpnode, scan->child, tuner->ret, iscantype, isat, ifrequency, iinversion, isymbolrate, ipolarization, ifec, imodulation, irolloff, ipilot, inetworkscan, ionlyfree, iclear, iblindscan, ichangename, isystem, ifavtype, iemptybouquet, iunusedbouquetchannels, iunusedsats, iunusedtransponder, iunusedchannels, iunusedprovider, 5000000, flag);
    23602408                        drawscreen(scan, 0, 0);
    23612409                }
Note: See TracChangeset for help on using the changeset viewer.