private int CompareEntityViewModel(EntityViewModel x, EntityViewModel y)
{
Debug.Assert(x != null, "x != null");
Debug.Assert(y != null, "y != null");
if (x.Source.Id == y.Source.Id) return 0;
if (x.Source.Fansubs.Count > 0 && y.Source.Fansubs.Count > 0)
return string.CompareOrdinal(x.Source.Fansubs[0], y.Source.Fansubs[0]);
if (x.Source.Extension != y.Source.Extension)
return string.CompareOrdinal(x.Source.Extension, y.Source.Extension);
return -1;
}