示例#1
0
 public PlaylistSongViewModel(Song song, bool isPlayed, bool isPlaying)
 {
     this.Song = song;
     this._isPlayed = isPlayed;
     this._isPlaying = isPlaying;
 }
示例#2
0
        private async Task AddOrUpdateSong(Song song, IEnumerable<string> genres)
        {
            songsToAdd.Add(song);
            foreach (var genre in genres)
                songGenresToAdd.Add(new Tuple<Song, string>(song, genre));

            if (songsToAdd.Count > 25)
                await AddAllRemainingSongs();
        }
示例#3
0
 internal async void GoToPlayMode(Song song, SongSource songSource)
 {
     var library = this.library ?? await libraryLoadingTask;
     if (await library.PlaylistManager.PlayFromSource(songSource, song.Id))
         this.audioControls.Play();
 }
示例#4
0
文件: Album.cs 项目: JulianMH/music-3
 public bool Contains(Song song)
 {
     return song.Album.Equals(this.Name, StringComparison.CurrentCultureIgnoreCase) && song.AlbumArtist.Equals(this.Artist, StringComparison.CurrentCultureIgnoreCase);
 }
示例#5
0
 public async Task<IEnumerable<Song>> PredictNextSongs(IEnumerable<Song> alreadyPredicted, Song current, int count)
 {
     return (await databaseConnection.QueryAsync<Song>("select s.* from Song s, CurrentPlaylistSong c where s.Id = c.SongId order by c.rank limit ? offset ?", count, alreadyPredicted.Count() + 1 + this.CurrentIndex));
 }