private void ApplyFavorites(DataRoot refDataRoot, ChannelInfo refChannel, ChannelInfo tvChannel) { if (this.DataRoot.SortedFavorites) { if (!this.DataRoot.MixedSourceFavorites || refDataRoot.MixedSourceFavorites) { tvChannel.Favorites = refChannel.Favorites & DataRoot.SupportedFavorites; if (refDataRoot.SortedFavorites) { var c = Math.Min(refDataRoot.FavListCount, this.DataRoot.FavListCount); for (int i = 0; i < c; i++) { tvChannel.SetPosition(i + 1, refChannel.GetOldPosition(i + 1)); } } else { this.ApplyPrNrToFavLists(tvChannel); } } } else { tvChannel.Favorites = refChannel.Favorites & DataRoot.SupportedFavorites; this.ApplyPrNrToFavLists(tvChannel); } }