コード例 #1
0
ファイル: TvCore.cs プロジェクト: ldj-droid/FoxIPTV
        /*
         * public static void AddFavoriteChannels(IEnumerable<string> channelIds)
         * {
         *  LogDebug("[TVCore] AddFavoriteChannels()");
         *
         *  ChannelFavorites.Clear();
         *  ChannelFavorites.AddRange(channelIds);
         *
         *  FavoritesSave();
         * }
         */

        /// <summary>Remove a favorite channel using the channel string based ID</summary>
        /// <param name="channelId">A string based key for the channel to un-favorite</param>
        public static void RemoveFavoriteChannel(string channelId)
        {
            LogDebug($"[TVCore] RemoveFavoriteChannel({channelId})");

            if (ChannelFavorites.Contains(channelId))
            {
                ChannelFavorites.Remove(channelId);
            }

            FavoritesSave();
        }