public static BackgroundTrackItem CreateBackgroundTrackItem(TrackItem track) { if (track == null) return null; BackgroundTrackItem audiotrack = new BackgroundTrackItem(track.Id, track.AlbumId, track.ArtistId, track.ArtistName, track.AlbumName, track.Name, track.Path); return audiotrack; }
public async Task AddToPlaylist(BackgroundTrackItem trackItem) { var list = new List<BackgroundTrackItem> { trackItem }; await AddToPlaylist(list); }
public Task Remove(BackgroundTrackItem track) { connectionLock = new SQLiteConnectionWithLock(platform, new SQLiteConnectionString(DbPath, false)); var connection = new SQLiteAsyncConnection(() => connectionLock); return connection.DeleteAsync(track); }