I'm really close to bringing PultoTV native to SageTV by using OpenDCT and Streamlink(No commercial lockups

). The guide data is provided by the XMLTV plugin which I updated. Guide data is created from Docker that was created for ChannelDVR (
https://github.com/maddox/pluto-for-channels). I have one issue I need to resolve. I need to force the EPG to update every 2 hours as PlutoTV only provides 8 hours ahead. I do not want to force all lineups to be updated just the PlutoTV. Forcing all lineups....especially SD would result in DOS. Does any one know an automated way to force a single lineup? Below is what I found so far.
1. Manually remove/add in channel setup all in one step and then exit it will trigger an EPG update.
2. Installing the Web Server Plugin by Nielm. This force an update on all the lineups. This is achieve by adding and removing a channel on all lineups
Code:
if ( SageApi.Size(AllInputs)> 0){
Map<?, ?> LineupMap = (Map<?, ?>)SageApi.Api("GroupByMethod",
new Object[]{AllInputs, "GetLineupForCaptureDeviceInput"});
Set<?> Lineups=LineupMap.keySet();
Iterator<?> it=Lineups.iterator();
while(it.hasNext()){
Object Lineup=it.next();
out.println("<p>Forcing update on lineup: "+Lineup.toString()+"</p>");
Object AllChannels = SageApi.Api("GetChannelsOnLineup",Lineup);
Object Channel=SageApi.GetElement(AllChannels,0);
Object ChannelNumbers = SageApi.Api("GetChannelNumbersForLineup",new Object[]{Channel, Lineup});
Object Number=SageApi.GetElement(ChannelNumbers,0);
boolean viewable=SageApi.booleanApi("IsChannelViewableOnNumberOnLineup",new Object[]{Channel, Number, Lineup});
// out.println("<p>Toggling viewable for channel number: "+Number.toString()+"</p>");
SageApi.Api("SetChannelViewabilityForChannelNumberOnLineup",new Object[]{Channel, Number, Lineup, new Boolean(!viewable)});
SageApi.Api("SetChannelViewabilityForChannelNumberOnLineup",new Object[]{Channel, Number, Lineup, new Boolean(viewable)});
}
// the following probably commits the changes and triggers an EPG update
SageApi.Api("RemoveUnusedLineups");
3. Modify epg_data_sources/#####/expanded_until entry in the Sage.properties. This requires SageTV server stopped before modification and restarted. Not sure if Sage Server reads these values all the time. It might be possible to use the SageAPI to rewrite the value once EPG update is done from the XMLTV plugin. If they are read all the time the XMLTV plugin could detect that it finished an update then change the values so it forces SageTV server to update on the next time.
https://forums.sagetv.com/forums/sho...3827#post43827
Code:
epg_data_sources/10788427/applied_service_level=2
epg_data_sources/10788427/chan_download_complete=true
epg_data_sources/10788427/disable_data_scanning=false
epg_data_sources/10788427/disable_plugin=false
epg_data_sources/10788427/enabled=true
epg_data_sources/10788427/epg_class=WarlockRipper
epg_data_sources/10788427/epg_name=PlutoTV
epg_data_sources/10788427/expanded_until=1643150170746
epg_data_sources/10788427/last_run=1643063770745
epg_data_sources/10788427/provider_id=200
epg_data_sources/10788427/server_update_id=
epg_data_sources/10788427/unavailable_channel_nums=
epg_data_sources/10788427/unavailable_stations=