Ejemplo n.º 1
0
        public override void Run()
        {
            if (!Active())
            {
                return;
            }

            try
            {
                using (System.IO.StreamWriter file = new System.IO.StreamWriter(Location()))
                {
                    file.WriteLine(ShowHtmlHelper.HTMLHeader(8, Color.White));
                    foreach (ShowItem si in Shows)
                    {
                        file.WriteLine(CreateHtml(si));
                    }

                    file.WriteLine(ShowHtmlHelper.HTMLFooter());
                }
            }
            catch (Exception e)
            {
                LOGGER.Error(e);
            }
        }
Ejemplo n.º 2
0
        protected override void Do()
        {
            using (System.IO.StreamWriter file = new System.IO.StreamWriter(Location()))
            {
                file.WriteLine(ShowHtmlHelper.HTMLHeader(8, Color.White));
                foreach (MovieConfiguration si in Shows)
                {
                    try
                    {
                        file.WriteLine(CreateHtml(si));
                    }
                    catch (Exception ex)
                    {
                        LOGGER.Error(ex,
                                     $"Skipped adding {si.ShowName} to the outpur HTML as it is missing some data. Please try checking the settings and doing a force refresh on the show.");
                    }
                }

                file.WriteLine(ShowHtmlHelper.HTMLFooter());
            }
        }