Changed mechanism for sorting and grouping media to support grouping the same item in multiple groups