public void Queued()
        {
            Log.Trace("Getting the settings");

            var settings = SrSettings.GetSettings();

            if (settings.Enabled)
            {
                Log.Trace("Getting all shows from SickRage");
                try
                {
                    var shows = SrApi.GetShows(settings.ApiKey, settings.FullUri);
                    if (shows != null)
                    {
                        Cache.Set(CacheKeys.SickRageQueued, shows.Result, CacheKeys.TimeFrameMinutes.SchedulerCaching);
                    }
                }
                catch (System.Exception ex)
                {
                    Log.Error(ex, "Failed caching queued items from SickRage");
                }
                finally
                {
                    Job.Record(JobNames.SrCacher);
                }
            }
        }
Esempio n. 2
0
        public void Queued(long check)
        {
            Log.Trace("This is check no. {0}", check);
            Log.Trace("Getting the settings");

            var settings = SrSettings.GetSettings();

            if (settings.Enabled)
            {
                Log.Trace("Getting all shows from SickRage");
                var movies = SrApi.GetShows(settings.ApiKey, settings.FullUri);
                Cache.Set(CacheKeys.SickRageQueued, movies.Result);
            }
        }