package backend;
import java.util.ArrayList;
import java.util.List;


public class Playlist {
	private List<Integer> tracks;
	private String name;
	private boolean toBeSynced;
	
	public Playlist(String name, List<Integer> tracks) {
		this.tracks = tracks;
		this.name = name;
		
		if (this.tracks == null) {
			this.tracks = new ArrayList<Integer>();
		}
		
		this.toBeSynced = true;
		
	}
	
	public Playlist(String name) {
		this(name, null);
	}
	
	public String getName() {
		return this.name;
	}
	
	public void toBeSynced(boolean flag) {
		this.toBeSynced = flag;
	}
	
	public boolean toBeSynced() {
		return this.toBeSynced;
	}
	
	public void addSong(int id) {
		this.tracks.add(id);
	}
	
	public List<Integer> getSongs() {
		return this.tracks;
	}
	
}
