Skip to content

Instantly share code, notes, and snippets.

@PembaTamang
Created April 18, 2021 13:43
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save PembaTamang/c0d59cd8adaf0808ad271a02f00b9329 to your computer and use it in GitHub Desktop.
Save PembaTamang/c0d59cd8adaf0808ad271a02f00b9329 to your computer and use it in GitHub Desktop.
SpotifyCloneMusicDatabase
class MusicDatabase {
private val url1 = "https://www.soundhelix.com/examples/mp3/SoundHelix-Song-1.mp3"
private val url2 = "https://www.soundhelix.com/examples/mp3/SoundHelix-Song-2.mp3"
private val url3 = "https://www.soundhelix.com/examples/mp3/SoundHelix-Song-3.mp3"
private val url4 = "https://www.soundhelix.com/examples/mp3/SoundHelix-Song-4.mp3"
private val url5 = "https://www.soundhelix.com/examples/mp3/SoundHelix-Song-5.mp3"
private val url6 = "https://www.soundhelix.com/examples/mp3/SoundHelix-Song-6.mp3"
private val artist =
"https://www.freepnglogos.com/uploads/apple-music-logo-circle-png-28.png"
suspend fun getAllSongs(): List<Song> {
return listOf(
Song("0", "Title One", "Artist One", url1, artist),
Song("1", "Title Two", "Artist Two", url2, artist),
Song("2", "Title Three", "Artist Three", url3, artist),
Song("3", "Title Four", "Artist Four", url4, artist),
Song("4", "Title Five", "Artist Five", url5, artist),
Song("5", "Title Six", "Artist Six", url6, artist),
)
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment