예제 #1
0
        private void ScheduleForUpdate(IResource root)
        {
            RSSPlugin plug = RSSPlugin.GetInstance();

            if (plug == null)
            {
                return;
            }
            foreach (IResource res in root.GetLinksTo(null, Core.Props.Parent).ValidResources)
            {
                if (res.Type == "RSSFeedGroup")
                {
                    ScheduleForUpdate(res);
                }
                else if (res.Type == "RSSFeed" && _oldRSSFeedList.IndexOf(res) == -1)
                {
                    if (!res.HasProp(Props.UpdateFrequency) || !res.HasProp(Props.UpdatePeriod))
                    {
                        res.SetProp(Props.UpdateFrequency, 4);
                        res.SetProp(Props.UpdatePeriod, UpdatePeriods.Hourly);
                    }
                    plug.ScheduleFeedUpdate(res);
                }
            }
        }