Changeset 24223


Ignore:
Timestamp:
10/12/13 11:13:07 (9 years ago)
Author:
nit
Message:

[titan] add flag to copy only provider/sat with channel

Location:
titan/titan
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • titan/titan/channellist.h

    r23672 r24223  
    910910                                if(list == PROVIDERLIST)
    911911                                {
    912                                         if(provider2bouquet(((struct provider*)listbox->select->handle1)->providerid) == 0)
     912                                        if(provider2bouquet(((struct provider*)listbox->select->handle1)->providerid, 0) == 0)
    913913                                                textbox(_("Message"), _("Copy providerlist successfull"), _("OK"), getrcconfigint("rcok", NULL), _("EXIT"), getrcconfigint("rcexit", NULL), NULL, 0, NULL, 0, 600, 200, 10, 0);
    914914                                        else
     
    917917                                else if(list == SATLIST)
    918918                                {
    919                                         if(sat2bouquet(((struct sat*)listbox->select->handle1)->orbitalpos) == 0)
     919                                        if(sat2bouquet(((struct sat*)listbox->select->handle1)->orbitalpos, 0) == 0)
    920920                                                textbox(_("Message"), _("Copy satlist successfull"), _("OK"), getrcconfigint("rcok", NULL), _("EXIT"), getrcconfigint("rcexit", NULL), NULL, 0, NULL, 0, 600, 200, 10, 0);
    921921                                        else
  • titan/titan/provider.h

    r23980 r24223  
    393393}
    394394
    395 int provider2bouquet(int providerid)
    396 {
     395//flag 0: add all provider
     396//flag 1: add only provider with channel
     397int provider2bouquet(int providerid, int flag)
     398{
     399        int treffer = 0;
    397400        struct provider* pnode = NULL;
    398401        struct mainbouquet* mnode = NULL;
     
    430433        }
    431434        free(tmpstr); tmpstr = NULL;
    432         free(path); path = NULL;
    433435
    434436        if(mnode != NULL)
     
    441443                                tmpstr = ostrcat(tmpstr, "#", 1, 0);
    442444                                tmpstr = ostrcat(tmpstr, ollutoa(chnode->transponderid), 1, 1);
     445                                treffer = 1;
    443446                                addbouquet(&mnode->bouquet, tmpstr, status.servicetype, 1, NULL);
    444447                                free(tmpstr); tmpstr = NULL;
     
    447450                }
    448451        }
    449 
     452       
     453        if(treffer == 0 && flag == 1)
     454                delmainbouquet(path, 1);
     455 
     456        free(path); path = NULL;
    450457        return 0;
    451458}
  • titan/titan/sat.h

    r23662 r24223  
    472472}
    473473
    474 int sat2bouquet(int orbitalpos)
    475 {
     474//flag 0: add all provider
     475//flag 1: add only provider with channel
     476int sat2bouquet(int orbitalpos, int flag)
     477{
     478        int treffer = 0;
    476479        struct sat* snode = NULL;
    477480        struct mainbouquet* mnode = NULL;
     
    509512        }
    510513        free(tmpstr); tmpstr = NULL;
    511         free(path); path = NULL;
    512514
    513515        if(mnode != NULL)
     
    520522                                tmpstr = ostrcat(tmpstr, "#", 1, 0);
    521523                                tmpstr = ostrcat(tmpstr, ollutoa(chnode->transponderid), 1, 1);
     524                                treffer = 1;
    522525                                addbouquet(&mnode->bouquet, tmpstr, status.servicetype, 1, NULL);
    523526                                free(tmpstr); tmpstr = NULL;
     
    526529                }
    527530        }
    528 
     531       
     532        if(treffer == 0 && flag == 1)
     533                delmainbouquet(path, 1);
     534
     535  free(path); path = NULL;
    529536        return 0;
    530537}
  • titan/titan/scan.h

    r24222 r24223  
    16481648                        while(pnode != NULL)
    16491649                        {
    1650                                 provider2bouquet(pnode->providerid);
     1650                                provider2bouquet(pnode->providerid, 1);
    16511651                                pnode = pnode->next;
    16521652                        }
Note: See TracChangeset for help on using the changeset viewer.