예제 #1
0
func Initialise(events *sconsify.Events) {
	playlists := sconsify.InitPlaylists()

	tracks := make([]*sconsify.Track, 2)
	tracks[0] = sconsify.InitTrack("bobmarley0", bobMarley, "Waiting in vain", "2m3s")
	tracks[1] = sconsify.InitTrack("bobmarley1", bobMarley, "Testing", "5m3s")
	playlists.AddPlaylist(sconsify.InitPlaylist("bobmarleyplaylist0", "Bob Marley", tracks))

	folderPlaylists := make([]*sconsify.Playlist, 2)

	tracks = make([]*sconsify.Track, 2)
	tracks[0] = sconsify.InitTrack("bobmarley2", bobMarley, "Waiting in vain", "2m3s")
	tracks[1] = sconsify.InitTrack("bobmarley3", bobMarley, "Testing", "5m3s")
	folderPlaylists[0] = sconsify.InitPlaylist("bobmarleyplaylist1", " Bob Marley and The Wailers", tracks)

	tracks = make([]*sconsify.Track, 3)
	tracks[0] = sconsify.InitTrack("ramones0", theRamones, "Ramones", "2m3s")
	tracks[1] = sconsify.InitTrack("ramones1", theRamones, "Ramones...", "3m21s")
	tracks[2] = sconsify.InitTrack("ramones2", theRamones, "The Ramones", "1m9s")
	folderPlaylists[1] = sconsify.InitPlaylist("ramonesplaylist0", " The Ramones", tracks)

	playlists.AddPlaylist(sconsify.InitFolder("folder", "My folder", folderPlaylists))

	tracks = make([]*sconsify.Track, 3)
	tracks[0] = sconsify.InitTrack("ramones3", theRamones, "I wanna be sedated", "2m3s")
	tracks[1] = sconsify.InitTrack("ramones4", theRamones, "Pet semetary", "3m21s")
	tracks[2] = sconsify.InitTrack("ramones5", theRamones, "Judy is a punk", "1m9s")
	playlists.AddPlaylist(sconsify.InitPlaylist("ramonesplaylist1", "Ramones", tracks))

	events.NewPlaylist(playlists)
	waitForMockEvents(events)
}
예제 #2
0
func createDummyPlaylist() *sconsify.Playlist {
	tracks := make([]*sconsify.Track, 4)
	tracks[0] = sconsify.InitTrack("0", "artist0", "name0", "duration0")
	tracks[1] = sconsify.InitTrack("1", "artist1", "name1", "duration1")
	tracks[2] = sconsify.InitTrack("2", "artist2", "name2", "duration2")
	tracks[3] = sconsify.InitTrack("3", "artist3", "name3", "duration3")
	return sconsify.InitPlaylist("0", "test", tracks)
}
예제 #3
0
func getSearchedPlaylist() *sconsify.Playlists {
	playlists := sconsify.InitPlaylists()
	tracks := make([]*sconsify.Track, 3)
	tracks[0] = sconsify.InitTrack("elvispreley0", elvisPresley, "Burning Love", "2m3s")
	tracks[1] = sconsify.InitTrack("elvispreley1", elvisPresley, "Love me tender", "2m4s")
	tracks[2] = sconsify.InitTrack("elvispreley2", elvisPresley, "It's now or never", "2m5s")
	playlists.AddPlaylist(sconsify.InitSearchPlaylist("elvispresley1", " Elvis Presley", tracks))

	return playlists
}
예제 #4
0
func getSearchedPlaylist() *sconsify.Playlists {
	playlists := sconsify.InitPlaylists()
	playlists.AddPlaylist(sconsify.InitSearchPlaylist("elvispresley1", " Elvis Presley", func(playlist *sconsify.Playlist) {
		playlist.AddTrack(sconsify.InitTrack("elvispreley0", elvisPresley, "Burning Love", "2m3s"))
		playlist.AddTrack(sconsify.InitTrack("elvispreley1", elvisPresley, "Love me tender", "2m4s"))
		playlist.AddTrack(sconsify.InitTrack("elvispreley2", elvisPresley, "It's now or never", "2m5s"))
	}))

	return playlists
}