aboutsummaryrefslogtreecommitdiffstats
path: root/src/mapper.c (unfollow)
Commit message (Collapse)AuthorFilesLines
2009-10-20mapper, update, ...: use g_build_filename(), G_DIR_SEPARATOR, ...Max Kellermann1-2/+2
Try to be as portable as possible, use GLib path name functions and macros.
2009-10-13song: renamed attribute "url" to "uri"Max Kellermann1-2/+2
2009-07-15mapper: use g_file_test() instead of stat()Max Kellermann1-20/+2
The GLib functions are more portable.
2009-07-15mapper: pass music and playlist directory to mapper_init()Max Kellermann1-17/+5
Added another glue function in main().
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-03-01use GLIB_CHECK_VERSION()Max Kellermann1-1/+1
Use GLIB_CHECK_VERSION() instead of manually checking GLIB_MAJOR_VERSION, ...
2009-01-30mapper: ignore duplicate slashes in playlistsMax Kellermann1-0/+3
When there are duplicate slashes in the song paths, eliminate them; example: /var/lib/mpd/music//foo.mp3 becomes: /var/lib/mpd/music/foo.mp3 The slash is only detected at the border between the music_directory and the local part.
2009-01-30mapper: remove trailing slashes from music_directoryMax Kellermann1-1/+15
When the user configures a music_directory with a trailing slash, it may break playlist loading, because MPD expects a double slash. Chop off the trailing slash.
2009-01-25mapper: added dot to PLAYLIST_FILE_SUFFIXMax Kellermann1-1/+1
Some code will be a little bit simpler if the dot is part of the string literal.
2009-01-18conf: removed parseConfigFilePath()Max Kellermann1-20/+19
Use config_get_path() instead in mapper.c.
2009-01-18mapper: make the music_directory optionalMax Kellermann1-25/+42
Without a music_directory, MPD is an excellent streaming client.
2009-01-18mapper: make the playlist directory optionalMax Kellermann1-14/+24
2009-01-17conf: no CamelCase, part IMax Kellermann1-2/+4
Renamed functions, types, variables.
2009-01-15mapper: check if g_get_user_special_dir() is supported by GLibMax Kellermann1-0/+2
g_get_user_special_dir() was introduced with GLib 2.14. Don't use it in older versions.
2009-01-08mapper: use directory_is_root() instead of isRootDirectory()Max Kellermann1-3/+2
2009-01-08path: allocate buffer in fs_charset conversion functionsMax Kellermann1-14/+19
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-08mapper: re-add character set conversion in map_uri_fs()Stepan Pologov1-0/+6
2009-01-07mapper: don't allocate music_dir twiceMax Kellermann1-1/+0
2009-01-04mapper: allocate the result of map_fs_to_utf8()Max Kellermann1-3/+5
2009-01-02mapper: allocate the result of map_directory_child_fs(), map_song_fs()Max Kellermann1-11/+12
Don't use fixed stack buffers.
2009-01-02mapper: allocate the result of map_uri_fs(), map_directory_fs()Max Kellermann1-19/+10
Don't use fixed stack buffers.
2009-01-01mapper: allocate playlist path from heapMax Kellermann1-12/+9
Don't pass a static buffer to map_spl_utf8_to_fs().
2009-01-01mapper: fall back to XDG music directoryMax Kellermann1-1/+11
If no music_directory is configured, fall back to the XDG music directory, determined by g_get_user_special_dir(G_USER_DIRECTORY_MUSIC).
2008-12-29removed os_compat.hMax Kellermann1-1/+5
Only include headers which are really needed. os_compat.h aimed to make MPD easily portable, but was never actually made portable.
2008-12-24playlist: fix stored playlist modifications with absolute pathsMax Kellermann1-1/+11
When save_absolute_paths_in_playlists was enabled in mpd.conf, MPD broke all playlists when manipulated using the "playlistdelete" command. The reason was that map_directory_child_fs() was used, which doesn't accept slashes in the file name. Use the new map_uri_fs() function instead.
2008-11-20mapper: use the utf8_to_fs_charset() resultKonstantin Sobolev1-1/+1
In map_directory_child_fs(), the result of utf8_to_fs_charset() was never used, because it passed the unmodified "name" parameter to pfx_dir().
2008-10-31mapper: check for "." and ".."Max Kellermann1-0/+5
Make map_directory_child_fs() refuse the names "." and "..". This is currently the interface where an attacker may inject a manipulated path (through the "update" command).
2008-10-31path: moved playlist_dir to mapper.cMax Kellermann1-0/+38
Added the function map_spl_utf8_to_fs() which replaces utf8_to_fs_playlist_path().
2008-10-31mapper: use g_warning() for loggingMax Kellermann1-5/+5
g_error() is fatal by default. Use g_warning() for non-fatal initialization errors.
2008-10-19mapper: don't return database path with leading slashMax Kellermann1-1/+1
Due to an off-by-one bug in map_fs_to_utf8(), the function returned database paths with a leading slash.
2008-10-15playlist: added support for adding songs not in the music databaseMax Kellermann1-2/+5
Clients which have authenticated via unix socket may add local files to the MPD playlist, provided that they own the file.
2008-10-15mapper: moved musicDir initialization from path.cMax Kellermann1-6/+45
Moved the musicDir variable and its initialization code from path.c to mapper.c.
2008-10-14mapper: new song-to-filesystem mapper libraryMax Kellermann1-0/+77
The mapper library maps directory and song objects to file system paths. With this central library, the code mixture in path.c should be cleaned up, and we will be able to add neat features like aliasing.