Exemple #1
0
        private IMedia GetMedia(Uri location)
        {
            AddProgress("Media At: " + location.ToString());
            var item = new TaskItem(location, (uint)progressCount, location.ToString().ElideString(10), TimeSpan.Zero, Guid.Empty.ToUrn(), mediaFactory.Default.Type.Name, false, false, null);

            UpdateItem(item);
            try
            {
                var medium = spider.GetMedia(location);
                if (medium != null)
                {
                    return(medium);
                }
                else
                {
                    logger.Warn("Media undefined for location: " + location.ToString());
                }
            }
            catch (Exception ex)
            {
                var description = "Could not get media at: " + location.ToString();
                AddError(description, ex);
            }

            return(null);
        }