aboutsummaryrefslogtreecommitdiffstats
path: root/src/PlaylistFile.cxx (unfollow)
Commit message (Collapse)AuthorFilesLines
2013-01-26Mapper: improve usage of Path classDenis Krjuchkov1-3/+3
2013-01-22Path: move to fs subdirectoryDenis Krjuchkov1-1/+1
2013-01-18Path: new class "Path" wraps filesystem path stringsMax Kellermann1-42/+27
2013-01-17path: convert to C++Max Kellermann1-1/+1
2013-01-09idle: convert to C++Max Kellermann1-1/+1
2013-01-07decoder_api.h, ...: add "extern C"Max Kellermann1-1/+1
2013-01-04PlaylistFile: reuse classes PlaylistInfo and PlaylistVectorMax Kellermann1-4/+6
.. instead of rolling own classes.
2013-01-03PlaylistFile: fix memory leakMax Kellermann1-0/+1
2013-01-03TextFile: convert to a classMax Kellermann1-6/+3
2013-01-03text_file: convert to C++Max Kellermann1-1/+1
2013-01-03database.h: eliminate db_*_song()Max Kellermann1-8/+9
Use the C++ API.
2013-01-02mapper: convert to C++Max Kellermann1-1/+1
2012-10-04PlaylistFile, client_file, tag_id3: don't use g_file_error_quark()Max Kellermann1-4/+3
g_file_error_quark() is meant to be used with the GFileError enum which does not correspond with errno, but must be converted with g_file_error_from_errno(). At the same time, this removes g_strerror() use for g_file_error_quark().
2012-09-28main: use C++ compilerMax Kellermann1-1/+1
2012-09-28PlaylistFile: use std::list instead of GPtrArrayMax Kellermann1-100/+53
2012-09-28stored_playlist, playlist_save: use C++ compilerMax Kellermann1-8/+12
2012-09-28stored_playlist: make variables more localMax Kellermann1-46/+25
2012-08-16DatabasePlugin: add method ReturnSong()Max Kellermann1-1/+3
Allow the plugin to allocate the GetSong() return value.
2011-09-11stored_playlist: return GError, code is playlist_resultMax Kellermann1-114/+190
Improve error reporting and handling. command.c gets the new function print_error(), which sends a GError to the client.
2011-09-11playlist: move PLAYLIST_COMMENT to stored_playlist.cMax Kellermann1-0/+2
Only used there.
2011-01-29copyright year 2011Max Kellermann1-1/+1
2010-12-23stored_playlist: remove database lookups from spl_load()Max Kellermann1-7/+1
Don't look up songs in the database, no caller needs this.
2010-12-23stored_playlist: ignore empty linesMax Kellermann1-1/+1
2010-12-23stored_playlist: use the text_file library to read linesMax Kellermann1-6/+4
2010-07-25database, ...: remove EINTR checks after stdio callsMax Kellermann1-10/+10
MPD doesn't have child processes anymore, and thus we're not expecting to receive SIGCHLD very often. Since hard disk access isn't interrupted by signals anyway, we don't need those excessive checks.
2009-12-31Update copyright notices.Avuton Olrich1-1/+1
2009-12-08mapper: apply filesystem_charset to playlistsMax Kellermann1-6/+21
This fixes an inconsistency in the stored playlist subsystem: when obtaining the list of playlists (listplaylist, listplaylistinfo), the file names in the playlist directory are converted to UTF-8 (according to filesystem_charset), but when saving or loading playlists, the filesystem_charset setting was ignored.
2009-12-08command: verify playlist name in the "rm" commandMax Kellermann1-0/+3
Call spl_valid_name() in spl_delete().
2009-11-12include config.h in all sourcesMax Kellermann1-0/+1
After we've been hit by Large File Support problems several times in the past week (which only occur on 32 bit platforms, which I don't have), this is yet another attempt to fix the issue.
2009-04-24stored_playlist: don't close NULL file on errorMax Kellermann1-5/+1
spl_append_song() can crash when fopen() fails, because it attempts to close the invalid file handle (NULL) in the error handler.
2009-03-13all: Update copyright header.Avuton Olrich1-6/+7
This updates the copyright header to all be the same, which is pretty much an update of where to mail request for a copy of the GPL and the years of the MPD project. This also puts all committers under 'The Music Player Project' umbrella. These entries should go individually in the AUTHORS file, for consistancy.
2009-02-25ls: moved generic URI utilities to uri.cMax Kellermann1-1/+1
"ls" is a bad name for a library which parses URIs. We'll move the rest of the "ls" library later.
2009-01-25playlist: moved is_valid_playlist_name() to stored_playlist.cMax Kellermann1-5/+23
2009-01-25stored_playlist: moved configuration variables from playlist.cMax Kellermann1-0/+15
Don't declare and export variables specific to stored playlists in playlist.c/playlist.h.
2009-01-25mapper: added dot to PLAYLIST_FILE_SUFFIXMax Kellermann1-7/+4
Some code will be a little bit simpler if the dot is part of the string literal.
2009-01-18mapper: make the playlist directory optionalMax Kellermann1-1/+18
2009-01-08path: allocate buffer in fs_charset conversion functionsMax Kellermann1-3/+3
Don't use fixed static buffers. GLib allocates a new string for us anyway, let's just return this one instead of copying it.
2009-01-04path: removed pfx_dir()Max Kellermann1-6/+4
Use GLib's g_build_filename() instead of pfx_dir().
2009-01-04song: allocate the result of song_get_url()Max Kellermann1-4/+4
2009-01-04mapper: allocate the result of map_fs_to_utf8()Max Kellermann1-2/+3
2009-01-04playlist: use uri_has_scheme() instead of isRemoteUrl()Max Kellermann1-12/+11
For internal checks (i.e. not in command.c), we need to check whether an URI is in the databse, in the local file system or a remote URI with a scheme.
2009-01-02playlist: use GLib instead of utils.hMax Kellermann1-2/+2
2009-01-01playlist: use g_file_test() instead of stat()Max Kellermann1-4/+2
To find out whether a file exists, use g_file_test() instead of stat(), because it is more portable and easier to use.
2009-01-01mapper: allocate playlist path from heapMax Kellermann1-28/+41
Don't pass a static buffer to map_spl_utf8_to_fs().
2008-12-29removed os_compat.hMax Kellermann1-1/+7
Only include headers which are really needed. os_compat.h aimed to make MPD easily portable, but was never actually made portable.
2008-12-28utils: removed myFgets()Max Kellermann1-1/+3
Replaced myFgets() with fgets() + g_strchomp().
2008-12-24stored_playlist: fix integer overflow in length estimationMax Kellermann1-1/+1
With a large maximum playlist length, the integer multiplication "playlist_max_length * MPD_PATH_MAX" may overflow. Change that to a division. This was not a dangerous bug, since it was only used for a quick estimate.
2008-12-16ls: removed isValidRemoteUtf8Url()Max Kellermann1-2/+2
The function didn't do anything useful, it was just several lines obfuscating that it was only forwarding isRemoteUrl()'s return value.
2008-10-31path: moved playlist_dir to mapper.cMax Kellermann1-17/+24
Added the function map_spl_utf8_to_fs() which replaces utf8_to_fs_playlist_path().
2008-10-26stored_playlist: fixed signed comparison warningMax Kellermann1-1/+1
Cast playlist_max_length to off_t before comparing it to stat.st_size.