Changeset 46325


Ignore:
Timestamp:
11/03/22 19:32:46 (17 months ago)
Author:
obi
Message:

fix reloadsettings

Location:
titan
Files:
3 edited

Legend:

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

    r46227 r46325  
    19341934        cmd = ostrcat(cmd, "ls -1 /mnt/settings/bouquets.tithek.autoupdate.*", 1, 0);
    19351935    debug(202, "cmd: %s", cmd);
    1936     printf("servicebouquets_update cmd: %s\n", cmd);
    19371936
    19381937        tmpstr1 = command(cmd);
    19391938    free(cmd), cmd= NULL;
    19401939    debug(202, "tmpstr1: %s", tmpstr1);
    1941     printf("servicebouquets_update tmpstr1: %s\n", tmpstr1);
    19421940//      tmpstr = readfiletomem(filename, 1);
    19431941
     
    19591957                        tmpstr2 = ostrcat((&ret1[i])->part, NULL, 0, 0);
    19601958            debug(202, "tmpstr2: %s", tmpstr2);
    1961             printf("servicebouquets_update tmpstr2: %s\n", tmpstr2);
    19621959
    19631960            tmpstr2 = string_replace_all("/mnt/settings/bouquets.tithek.autoupdate.", "", tmpstr2, 1);
    1964             printf("servicebouquets_update tmpstr2a: %s\n", tmpstr2);
     1961            debug(202, "tmpstr2a: %s", tmpstr2);
    19651962
    19661963                        tmpstr3 = ostrcat(tmpstr2, NULL, 0, 0);
     
    19681965            tmpstr3 = stringreplacecharonce(tmpstr3, '.', '-');
    19691966            debug(202, "tmpstr3: %s", tmpstr3);
    1970             printf("servicebouquets_update tmpstr3: %s\n", tmpstr3);
    19711967
    19721968                        ret2 = strsplit(tmpstr2, ".", &count2);
     
    19791975                localparser = ostrcat(localparser, ".sh", 1, 0);
    19801976                debug(202, "localparser: %s", localparser);
    1981                 printf("servicebouquets_update channellist localparser: %s\n", localparser);
    19821977
    19831978                    if(!file_exist("/tmp/localhoster"))
     
    19931988
    19941989                    debug(202, "cmd2: %s", cmd);
    1995                     printf("servicebouquets_update cmd2: %s\n", cmd);
    19961990
    19971991                    tmpstr = command(cmd);
    19981992                    debug(202, "tmpstr: %s", tmpstr);
    1999                     printf("servicebouquets_update tmpstr: %s\n", tmpstr);
    20001993
    20011994                    free(cmd), cmd = NULL;
     
    20082001
    20092002                    cmd = string_replace_all("%search%", (&ret2[1])->part, cmd, 1);
    2010                     printf("servicebouquets_update cmd3: %s\n", cmd);
     2003                    debug(202, "cmd3: %s", cmd);
    20112004
    20122005                    tmpstr = command(cmd);
    2013                     printf("servicebouquets_update tmpstr: %s\n", tmpstr);
     2006                    debug(202, "tmpstr: %s", tmpstr);
    20142007
    20152008                    free(cmd), cmd = NULL;
     
    20302023                        textbox(_("Message"), tmpstr2, _("OK"), getrcconfigint("rcok", NULL), NULL, 0, NULL, 0, NULL, 0, 1100, 300, 5, 2);
    20312024                debug(202, "%s", tmpstr2);
    2032             printf("servicebouquets_update channellist: %s\n", tmpstr2);
    20332025                    drawscreen(skin, 0, 0);
    20342026            free(tmpstr2), tmpstr2 = NULL;
     
    20382030        }
    20392031        else
    2040             printf("servicebouquets_update channellist: channellist unchanged\n%s\n", tmpstr);
     2032        {
     2033            debug(202, "channellist unchanged\n%s", tmpstr);
     2034                }
    20412035        free(tmpstr), tmpstr = NULL;
    20422036    }
  • titan/titan/global.h

    r46286 r46325  
    87838783                }
    87848784        }
    8785 /*
    8786         if(getconfigint("tithek_servicebouquets_autoupdate_msg", NULL) == 1)
    8787                 textbox(_("Message"), _("Titan will be reloaded Channellist!"), _("OK"), getrcconfigint("rcok", NULL), NULL, 0, NULL, 0, NULL, 0, 1000, 200, 0, 0);
    8788             debug(202, "Titan will be reloaded channellist!");
    8789         freesat();
    8790         freeallbouquet();
    8791         freemainbouquet(0);
    8792         freechannel(0);
    8793         freetransponder();
    8794         freeprovider();
    8795         ret = readsat(getconfig("satfile", NULL));
    8796         ret = readtransponder(getconfig("transponderfile", NULL));
    8797         ret = readprovider(getconfig("providerfile", NULL));
    8798         ret = readchannel(getconfig("channelfile", NULL));
    8799         ret = readtransponderencoding(getconfig("transponderencodingfile", NULL));
    8800         ret = readmainbouquet(getconfig("bouquetfile", NULL));
    8801         ret = readallbouquet();
    8802 */
    88038785    }
    88048786}
     
    88078789{
    88088790    int ret = 0;
    8809 
     8791        char* tmpstr = NULL;
     8792
     8793        freemostzap(0);
     8794        //clear akt and last channel, so all channel can delete
     8795        freechannelhistory();
     8796        status.lastservice->channel = NULL;
     8797//      status.aktservice->channel = NULL;
     8798       
    88108799    freesat();
    88118800    freeallbouquet();
     
    88148803    freetransponder();
    88158804    freeprovider();
     8805
    88168806    ret = readsat(getconfig("satfile", NULL));
    8817     printf("servicebouquets_update ret1: %d\n", ret);
     8807    debug(202, "ret1: %d", ret);
     8808
    88188809    ret = readtransponder(getconfig("transponderfile", NULL));
    8819     printf("servicebouquets_update ret2: %d\n", ret);
     8810    debug(202, "ret2: %d", ret);
     8811
    88208812    ret = readprovider(getconfig("providerfile", NULL));
    8821     printf("servicebouquets_update ret3: %d\n", ret);
     8813    debug(202, "ret3: %d", ret);
     8814
    88228815    ret = readchannel(getconfig("channelfile", NULL));
    8823     printf("servicebouquets_update ret4: %d\n", ret);
     8816    debug(202, "ret4: %d", ret);
     8817
    88248818    ret = readtransponderencoding(getconfig("transponderencodingfile", NULL));
    8825     printf("servicebouquets_update ret5: %d\n", ret);
     8819    debug(202, "ret5: %d", ret);
     8820
    88268821    ret = readmainbouquet(getconfig("bouquetfile", NULL));
    8827     printf("servicebouquets_update ret6: %d\n", ret);
     8822    debug(202, "ret6: %d", ret);
     8823
    88288824    ret = readallbouquet();
    8829     printf("servicebouquets_update ret7: %d\n", ret);
     8825    debug(202, "ret7: %d", ret);
    88308826
    88318827    if(input != NULL)
     
    88408836                if(aktlist != NULL)
    88418837                {
    8842                 printf("servicebouquets_update sort: %s\n", input);
     8838                            debug(202, "sort bouquet: %s", input);
    88438839                        sortbouquet(&((struct mainbouquet*)aktlist)->bouquet);
     8840                            debug(202, "recalc bouquet: %s", input);
    88448841                        recalcbouquetnr();
    88458842                }
    88468843        }
    88478844    }
    8848 //            free(tmpstr3), tmpstr3 = NULL;
    8849 
    8850 //              status.aktservice = addservice(NULL);
    8851 //              status.lastservice = addservice(NULL);
    8852 //              status.pipservice = addservice(NULL);
    8853 
    8854     //tune new if tunerconfig saved
    8855 //              if(ret == 0)
    8856 //              {
    8857 /*
    8858         ret = servicestop(status.aktservice, 1, 1);
    8859         printf("servicebouquets_update ret7: %d\n", ret);
    8860         if(ret == 0 && status.play != 1)
    8861         {
    8862             printf("servicebouquets_update restart aktservice: %s\n", status.aktservice->channel);
    8863                 status.aktservice->transponder = NULL;
    8864                 servicecheckret(servicestart(status.aktservice->channel, NULL, NULL, 5), 0);
    8865         }
    8866 */
    8867 //                      resettvpic();
    8868 //                      drawscreen(tunerconfig, 0, 0);
    8869 //                      clearscreen(tunerconfig);
    8870 //                      drawscreen(skin, 0, 0);
    8871 //              }
    8872 
     8845
     8846        //recalc channels
     8847        struct channel* chnode = channel;
     8848        while(chnode != NULL)
     8849        {
     8850                if(chnode->servicetype != 99)
     8851                {
     8852                    debug(202, "recalc channel: %s", chnode->name);
     8853                        chnode->transponder = gettransponder(chnode->transponderid);
     8854                        chnode->provider = getprovider(chnode->providerid);
     8855                }
     8856                chnode = chnode->next;
     8857        }
     8858
     8859        writeallconfig(1);
    88738860}
    88748861
  • titan/titan/header.h

    r46321 r46325  
    277277int delmostzap(int serviceid, uint64_t transponderid, int flag);
    278278void mostzaptobouquet(struct mainbouquet* mbouquet);
     279void freemostzap(int flag);
    279280
    280281//thumb.h
     
    516517void freeprovider();
    517518int readprovider(const char* filename);
     519struct provider* getprovider(int providerid);
    518520
    519521//httpd.h
Note: See TracChangeset for help on using the changeset viewer.