Ticket #1520: mythtv-mythfilldatabase-remove_new_channels.patch

File mythtv-mythfilldatabase-remove_new_channels.patch, 2.2 KB (added by sphery <mtdean@…>, 18 years ago)
  • programs/mythfilldatabase/filldata.cpp

     
    6464bool mark_repeats = true;
    6565bool channel_updates = false;
    6666bool channel_update_run = false;
     67bool remove_new_channels = false;
    6768bool only_update_channels = false;
    6869bool need_post_grab_proc = true;
    6970QString logged_in = "";
     
    817818
    818819    bool insert_channels = channel_updates;
    819820    if (!insert_channels)
    820         insert_channels = SourceUtil::IsAnalog(source.id);
     821        insert_channels = (SourceUtil::IsAnalog(source.id) &&
     822                           !remove_new_channels);
    821823
    822824    DataDirectProcessor::UpdateChannelsSafe(source.id, insert_channels);
    823825
     
    33733375        {
    33743376            channel_updates = true;
    33753377        }
     3378        else if (!strcmp(a.argv()[argpos], "--remove-new-channels"))
     3379        {
     3380            remove_new_channels = true;
     3381        }
    33763382        else if (!strcmp(a.argv()[argpos], "--graboptions"))
    33773383        {
    33783384            if (((argpos + 1) >= a.argc()))
     
    35823588            cout << "   override custom channel names, which is why it is\n";
    35833589            cout << "   off by default.\n";
    35843590            cout << "\n";
     3591            cout << "--remove-new-channels\n";
     3592            cout << "   When using DataDirect, ask mythfilldatabase to\n";
     3593            cout << "   remove new channels (those not in the database)\n";
     3594            cout << "   from the DataDirect lineup.  These channels are\n";
     3595            cout << "   removed from the lineup as if you had done so\n";
     3596            cout << "   via the DataDirect website's Lineup Wizard, but\n";
     3597            cout << "   may be re-added manually and incorporated into\n";
     3598            cout << "   MythTV by running mythfilldatabase without this\n";
     3599            cout << "   option.  New channels are automatically removed\n";
     3600            cout << "   for DVB and HDTV sources that use DataDirect.\n";
     3601            cout << "\n";
    35853602            cout << "--graboptions <\"options\">\n";
    35863603            cout << "   Pass options to grabber\n";
    35873604            cout << "\n";