예제 #1
0
        private async Task <bool> InsertMHzItemAsync(MHzSongBase song, int index = -1)
        {
            var find_index = MHzSongList.ToList().FindIndex(i => i.SHA256 == song.SHA256);

            if (find_index != -1)
            {
                return(true);
            }
            var item = await MusicServiceHelper.CreatePlayItemAsync(song);

            var retuenIndex = InsertMHzItem(item, index);

            MHzSongList.Insert(retuenIndex, song);
            RaisePropertyChanged("MHzSongList");
            return(retuenIndex == -1 ? false : true);
        }
예제 #2
0
 private MHzSongBase SelectMHzSongItemBySHA256(string sha256)
 {
     return(MHzSongList.ToList().Find(i => i.SHA256 == sha256));
 }
예제 #3
0
        public bool IsExistMHzItem(MHzSongBase song)
        {
            var find_index = MHzSongList.ToList().FindIndex(i => i.SHA256 == song.SHA256);

            return(find_index == -1 ? false : true);
        }