Esempio n. 1
0
/* Save the playlist into the file. Return 0 on error. If cwd is NULL, use
 * absolute paths. */
int plist_save (struct plist *plist, const char *file, const char *cwd,
		const int save_serial)
{
	char common_path[PATH_MAX+1];

	/* FIXME: check if it possible to just add some directories to make
	 * relative path working. */
	return plist_save_m3u (plist, file, cwd && !strcmp(common_path, cwd) ?
			strlen(common_path) : 0, save_serial);
}
Esempio n. 2
0
/* Save play list */
bool_t plist_save( plist_t *pl, char *filename )
{
	char *ext = util_extension(filename);
	assert(pl);

	if (!strcasecmp(ext, "m3u"))
		return plist_save_m3u(pl, filename);
	else if (!strcasecmp(ext, "pls"))
		return plist_save_pls(pl, filename);
	return FALSE;
} /* End of 'plist_save' function */