add DirectSend config option

This commit is contained in:
PicelBoi committed 2026-01-25 19:01:17 -05:00
1 parent f773e297bf
commit 328dccfeed
2 files changed
+12 -3

No files matched your search

+4
View File
@@ -485,6 +485,10 @@ public class Config
[XmlAnyElement("CheckAlertTimeComment")]
public XmlComment CheckAlertTimeComment { get { return new XmlDocument().CreateComment("Sets how long should i2ME wait before grabbing alerts."); } set { } }
[XmlElement] public int CheckAlertTimeSeconds { get; set; } = 600; // Defaults to 10 minutes
[XmlAnyElement("DirectSendComment")]
public XmlComment DirectSendComment { get { return new XmlDocument().CreateComment("Should i2ME directly send Headline/BulletinCrawls records instead of the default BERecord? This is NOT the option if you're aiming for accuracy, but it does help with getting alerts for international locations or having your i2 display a unknown alert as a headline/bulletin."); } set { } }
[XmlElement] public bool DirectSend { get; set; } = false;
}
[XmlRoot("LocalConfig")]
+8 -3
View File
@@ -55,9 +55,14 @@ public class TimedTasks
serializer.Serialize(sw, bulletinRecord, ns);
sw.Close();
}
//sender.SendFile(recordPath, "storeData(QGROUP=__BERecord__,Feed=BERecord)");
sender.SendFile(await new Headlines().MakeRecord(bulletinRecord), "storeData(QGROUP=__Headline__,Feed=Headline)");
await new BulletinCrawlsGen().MakeRecord(bulletinRecord, sender);
if (Config.config.AConfig.DirectSend)
{
sender.SendFile(await new Headlines().MakeRecord(bulletinRecord), "storeData(QGROUP=__Headline__,Feed=Headline)");
await new BulletinCrawlsGen().MakeRecord(bulletinRecord, sender);
} else
{
sender.SendFile(recordPath, "storeData(QGROUP=__BERecord__,Feed=BERecord)");
}
}
await Task.Delay(checkInterval * 1000);