コード例 #1
0
bool Playlist::addPath (const string &path) {
	Playlist backup = Playlist(this);
	if (buildPath (path, true)) {
		_MESSAGE ("%lld | Playlist: \"%s\" > Added path: \"%s\"", timeStamp, name, path.c_str ());
		initialized = true;
		destroyed = false;
		sortTracks (true);
		curIndex = -1;
		return true;
	} else {
		_MESSAGE ("%lld | Playlist: \"%s\" > const string &is not valid or empty: \"%s\"", timeStamp, name, path.c_str ());
		backup.moveTo (this);
		return false;
	}
}
コード例 #2
0
bool Playlist::setPaths (const string &paths, bool randomOrder) {
	Playlist backup = Playlist (this);
	if (buildPaths (paths)) {
		_MESSAGE ("%lld | Playlist: \"%s\" > New paths: \"%s\"", timeStamp, name, paths.c_str ());
		initialized = true;
		destroyed = false;
		Playlist::randomOrder = randomOrder;
		sortTracks (true);
		curIndex = -1;
		return true;
	} else {
		_MESSAGE ("%lld | Playlist: \"%s\" > Path is not valid or empty: \"%s\"", timeStamp, name, paths.c_str ());
		backup.moveTo (this);
		initialized = false;
		return false;
	}
}