protected override void ReLoadItemsAndSubViewSpecifications(out IList<MediaItem> mediaItems, out IList<ViewSpecification> subViewSpecifications)
    {
      base.ReLoadItemsAndSubViewSpecifications(out mediaItems, out subViewSpecifications);
      // Grouped display, nothing to do here
      if (subViewSpecifications.Count > 0)
        return;

      try
      {
        var mediaItemsResults = mediaItems;
        var lookup = mediaItemsResults.ToLookup(GetBestTitle, r => r).ToLookup(r => r.Count() == 1);
        // [true] --> Single media items
        // [false]--> Multi media items
        subViewSpecifications = new List<ViewSpecification>(0);
        var groupedItems = lookup[false].OrderByDescending(g => g.Max(r => GetBestDate(r)));
        foreach (IGrouping<string, MediaItem> group in groupedItems)
        {
          StackingSubViewSpecification subViewSpecification = new StackingSubViewSpecification(group.Key, NecessaryMIATypeIds, OptionalMIATypeIds, group.ToList());
          subViewSpecifications.Add(subViewSpecification);
        }
        // Only one item per group, so first takes the only one
        mediaItems = lookup[true].Select(group => group.First()).ToList();
      }
      catch (Exception e)
      {
        ServiceRegistration.Get<ILogger>().Error("StackingViewSpecification.ReLoadItemsAndSubViewSpecifications: Error requesting server", e);
        mediaItems = null;
        subViewSpecifications = null;
      }
    }
        protected override void ReLoadItemsAndSubViewSpecifications(out IList <MediaItem> mediaItems, out IList <ViewSpecification> subViewSpecifications)
        {
            base.ReLoadItemsAndSubViewSpecifications(out mediaItems, out subViewSpecifications);
            // Grouped display, nothing to do here
            if (subViewSpecifications.Count > 0)
            {
                return;
            }

            try
            {
                var mediaItemsResults = mediaItems;
                var lookup            = mediaItemsResults.ToLookup(GetBestTitle, r => r).ToLookup(r => r.Count() == 1);
                // [true] --> Single media items
                // [false]--> Multi media items
                subViewSpecifications = new List <ViewSpecification>(0);
                var groupedItems = lookup[false].OrderByDescending(g => g.Max(r => GetBestDate(r)));
                foreach (IGrouping <string, MediaItem> group in groupedItems)
                {
                    StackingSubViewSpecification subViewSpecification = new StackingSubViewSpecification(group.Key, NecessaryMIATypeIds, OptionalMIATypeIds, group.ToList());
                    subViewSpecifications.Add(subViewSpecification);
                }
                // Only one item per group, so first takes the only one
                mediaItems = lookup[true].Select(group => group.First()).ToList();
            }
            catch (Exception e)
            {
                ServiceRegistration.Get <ILogger>().Error("StackingViewSpecification.ReLoadItemsAndSubViewSpecifications: Error requesting server", e);
                mediaItems            = null;
                subViewSpecifications = null;
            }
        }