aboutsummaryrefslogtreecommitdiffstats
path: root/src/Mapper.cxx (unfollow)
Commit message (Collapse)AuthorFilesLines
2013-08-07ConfigPath: return a Path objectMax Kellermann1-32/+20
Migrate all callers to use Path directly, instead of doing the conversion in each caller.
2013-07-28song: convert header to C++Max Kellermann1-5/+5
2013-05-05DirectoryReader: rename Failed() to HasFailed() for consistency with TextFileDenis Krjuchkov1-1/+1
2013-01-28Path::FromUTF8() returns nulled instance on error, add error handling where ↵Denis Krjuchkov1-9/+36
required
2013-01-28Path: convert fs_charset_to_utf8() to static method Path::ToUTF8()Denis Krjuchkov1-1/+5
2013-01-26Mapper: improve usage of Path classDenis Krjuchkov1-31/+28
2013-01-22Path: move to fs subdirectoryDenis Krjuchkov1-1/+1
2013-01-18Path: new class "Path" wraps filesystem path stringsMax Kellermann1-51/+31
2013-01-17path: convert to C++Max Kellermann1-4/+1
2013-01-03Directory: rename struct directory to DirectoryMax Kellermann1-2/+2
2013-01-02Directory: turn functions to methodsMax Kellermann1-2/+2
2013-01-02Directory: make the header C++ onlyMax Kellermann1-1/+1
2013-01-02mapper: convert to C++Max Kellermann1-2/+5
2012-08-15Song: add function song_dup_detached()Max Kellermann1-1/+20
Initial support for "detached" songs that come from the database, but are private copies.
2012-08-15mapper: fix potential crash in file permission checkMax Kellermann1-3/+3
2012-08-14mapper: fix non-UTF8 music directory nameMax Kellermann1-32/+57
Duplicate the music_dir variable: one encoded in UTF-8, and another one using the configured filesystem character set. This fixes an ancient MPD bug.
2012-02-13mapper: add mapper_get_music_directory()Max Kellermann1-3/+3
Shortcut for map_directory_fs(db_get_root()).
2011-11-28mapper: check "r" permission on music directoryMax Kellermann1-0/+7
Yet another common support case.
2011-11-28mapper: check "x" permission on music directoryMax Kellermann1-0/+8
This is a common support case, and hopefully, the new error message will allow the user to understand the error without requiring support.
2011-11-28mapper: fix the bogus "not a directory" error messageMax Kellermann1-1/+13
Use stat() instead of g_file_test() to detect other types of errors, such as "permission denied".
2011-11-28mapper: move code to check_directory()Max Kellermann1-8/+11
2011-01-29copyright year 2011Max Kellermann1-1/+1
2010-07-25{queue,song}_print: print relative paths if possibleMax Kellermann1-0/+10
If a song with an absolute path points inside the music directory, print only the relative part. This happens when partial songs from a playlist file were loaded.
2009-12-31Update copyright notices.Avuton Olrich1-1/+1
2009-12-08mapper: apply filesystem_charset to playlistsMax Kellermann1-4/+9
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-08mapper: fix memory leak when playlist_directory is not setMax Kellermann1-2/+2
Don't allocate the file name before the playlist_dir==NULL check.
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-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).