| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
| |
When a directory is deleted, MPD deleted only the directory from the
database; it did not bother to walk the full tree to free all memory
and to remove deleted songs from the playlist. Replace a
dirvec_delete() with delete_directory().
|
|
|
|
|
| |
If stickers are not configured at runtime, don't call
sticker_song_delete().
|
|
|
|
|
|
|
| |
Export the "g_playlist" variable, and pass it to all playlist
functions. This way, we can split playlist.c easier into separate
parts. The code which initializes the singleton variable is moved to
playlist_global.c.
|
|
|
|
|
|
| |
On some platforms, g_free() must be used for memory allocated by
GLib. This patch intends to correct a lot of occurrences, but is
probably not complete.
|
|
|
|
|
|
|
| |
When a song is deleted from the database, remove its sticker, too.
What's still missing is some sort of garbage collector after a fresh
database create (--create-db).
|
|
|
|
| |
Without a music_directory, MPD is an excellent streaming client.
|
| |
|
|
|
|
|
| |
Don't use fixed static buffers. GLib allocates a new string for us
anyway, let's just return this one instead of copying it.
|
|
|
|
|
| |
The archive code was disabled, because config.h was not included and
thus ENABLE_ARCHIVE was not defined.
|
|
|
|
| |
Save an empty database, even if the music directory is empty.
|
| |
|
|
|
|
| |
The notify library is easier to use, and has no disadvantages.
|
| |
|
|
|
|
|
|
| |
Handle the DELETE and UPDATE events in separate callbacks:
song_delete_event() safely deletes a song, and update_finished_event()
is called when database update is complete.
|
|
|
|
|
| |
GLib mandates that you initialize all GError objects with NULL prior
to passing it.
|
|
|
|
| |
Use GLib's g_build_filename() instead of pfx_dir().
|
| |
|
|
|
|
|
| |
directory_is_root() is cheaper than
isRootDirectory(directory_get_path()).
|
| |
|
|
|
|
| |
The struct delete_data has only one member left and can be eliminated.
|
|
|
|
|
|
|
|
| |
Determine the suffix manually, and use decoder_plugin_from_suffix()
and archive_plugin_from_suffix() instead.
This way, song_file_update_inarchive() can be optimized: it does not
have to translate its path.
|
| |
|
|
|
|
|
| |
Reverse the condition: delete directories which don't exist anymore.
This typo caused a slowdown during partial database update.
|
|
|
|
|
|
| |
WIN32 does have some kind of symbolic links (e.g. in NTFS), but the
readlink() function is not available. Disable symlink checking for
now.
|
| |
|
| |
|
|
|
|
| |
Don't use fixed stack buffers.
|
|
|
|
| |
Don't use fixed stack buffers.
|
|
|
|
|
| |
If we want to check whether a file is a directory, use GLib's
g_file_test() instead of stat().
|
|
|
|
|
|
|
|
|
| |
Make the event_pipe (formerly main_notify) send/receive a set of
events, with a callback for each one.
The default event PIPE_EVENT_SIGNAL does not have a callback. It
is still there for waking up the main thread, when it is waiting for
the player thread.
|
|
|
|
| |
Continuing the previous patch.
|
|
|
|
|
|
| |
We are going to migrate away from the concept of notifying the main
thread. There should be events sent to it instead. This patch starts
a series to implement that.
|
| |
|
|
|
|
|
| |
Only include headers which are really needed. os_compat.h aimed to
make MPD easily portable, but was never actually made portable.
|
| |
|
| |
|
|
|
|
|
| |
When there are no archive plugins, we do not need the archive API at
all. Drop all its overhead.
|
|\
| |
| |
| |
| |
| |
| |
| | |
Conflicts:
configure.ac
src/ls.h
src/output/shout_plugin.c
|
| | |
|
|/
|
|
|
|
| |
MPD 0.13 and older followed all symbolic links. Although this can be
a security problem (as it has always been), 0.14 should offer the same
default behaviour as 0.13.
|
|
|
|
|
|
|
|
|
| |
The configuration options "follow_outside_symlinks" and
"follow_inside_symlinks" let the user control whether MPD should
follow symbolic links in the music directory.
[mk: converted variables to "bool"; moved configuration to
update_global_init()]
|
|
|
|
|
|
| |
Those two functions are called when MPD starts and exits. It allows
the update library to perform global initialization and
deinitialization. The implementations are currently empty.
|
| |
|
|
|
|
|
| |
Renamed the local variable "basename", which shadows the POSIX
function basename().
|
|
|
|
|
|
| |
skip_symlinks() expects an UTF-8 encoded file name, but
updateDirectory() passed ent->d_name (in file system encoding) to it.
Convert it to UTF-8 first.
|
|
|
|
|
| |
Nearly all mapper functions can fail and will then return NULL. Add
checks to all callers.
|
|
|
|
|
|
| |
GLib's g_path_get_basename() is much more reliable than
mpd_basename(). The latter could be tricked into an assertion
failure.
|
|
|
|
|
| |
Skip only the special directory entries "." and "..", don't skip all
other "hidden" files.
|
|
|
|
|
|
| |
"idle" waits until something noteworthy happens on the server,
e.g. song change, playlist modified, database updated. This allows
clients to keep up to date without polling.
|
|
|
|
|
|
| |
Don't follow relative symlinks which point into the music directory.
This allows you to organize music with symbolic links, without MPD
managing separate copies of each song.
|