aboutsummaryrefslogtreecommitdiff
path: root/src/update.c
Commit message (Collapse)AuthorAge
...
* path: removed pfx_dir()Max Kellermann2009-01-04
| | | | Use GLib's g_build_filename() instead of pfx_dir().
* song: allocate the result of song_get_url()Max Kellermann2009-01-04
|
* directory: added directory_is_root()Max Kellermann2009-01-04
| | | | | directory_is_root() is cheaper than isRootDirectory(directory_get_path()).
* ls: renamed functions, no CamelCaseMax Kellermann2009-01-04
|
* update: removed struct delete_dataMax Kellermann2009-01-04
| | | | The struct delete_data has only one member left and can be eliminated.
* ls: removed hasMusicSuffix() and get_archive_by_suffix()Max Kellermann2009-01-04
| | | | | | | | 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.
* update: moved code to update_regular_file()Max Kellermann2009-01-04
|
* update: moved code to directory_exists(), fix typoMax Kellermann2009-01-04
| | | | | Reverse the condition: delete directories which don't exist anymore. This typo caused a slowdown during partial database update.
* update: don't check for symlinks on WIN32Max Kellermann2009-01-03
| | | | | | WIN32 does have some kind of symbolic links (e.g. in NTFS), but the readlink() function is not available. Disable symlink checking for now.
* event_pipe: moved variable "main_task" to main.cMax Kellermann2009-01-03
|
* update: use GLib instead of utils.hMax Kellermann2009-01-02
|
* mapper: allocate the result of map_directory_child_fs(), map_song_fs()Max Kellermann2009-01-02
| | | | Don't use fixed stack buffers.
* mapper: allocate the result of map_uri_fs(), map_directory_fs()Max Kellermann2009-01-02
| | | | Don't use fixed stack buffers.
* update: use g_file_test() instead of stat()Max Kellermann2009-01-02
| | | | | If we want to check whether a file is a directory, use GLib's g_file_test() instead of stat().
* event_pipe: added pipe_event enum and callbacksMax Kellermann2009-01-01
| | | | | | | | | 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.
* event_pipe: renamed functions from main_notify_* to event_pipe_*Max Kellermann2009-01-01
| | | | Continuing the previous patch.
* main_notify: renamed source to event_pipe.cMax Kellermann2009-01-01
| | | | | | 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.
* update: use GLib loggingMax Kellermann2008-12-29
|
* removed os_compat.hMax Kellermann2008-12-29
| | | | | Only include headers which are really needed. os_compat.h aimed to make MPD easily portable, but was never actually made portable.
* update: fixing empty filenames in archivesViliam Mateicka2008-12-29
|
* update & main_notify: migrate from pthread to glib threadsThomas Jansen2008-12-28
|
* disable archive API without pluginsMax Kellermann2008-12-27
| | | | | When there are no archive plugins, we do not need the archive API at all. Drop all its overhead.
* Merge branch 'experimental' of git://git.musicpd.org/metyl/mpdMax Kellermann2008-12-27
|\ | | | | | | | | | | | | | | Conflicts: configure.ac src/ls.h src/output/shout_plugin.c
| * update: adding archive updating related codeViliam Mateicka2008-12-16
| |
* | update: default to follow all symlinksAvuton Olrich2008-12-08
|/ | | | | | 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.
* update: added options which control symlink behaviourRaphaƫl Rigo2008-11-28
| | | | | | | | | 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()]
* update: added update_global_init() and update_global_finish()Max Kellermann2008-11-27
| | | | | | 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.
* update.c: replaced mpd_unused by G_GNUC_UNUSEDThomas Jansen2008-11-24
|
* update: fixed shadow warning on "basename"Max Kellermann2008-11-22
| | | | | Renamed the local variable "basename", which shadows the POSIX function basename().
* update: pass UTF-8 path to skip_symlink()Konstantin Sobolev2008-11-20
| | | | | | 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.
* update: check return valuesMax Kellermann2008-10-31
| | | | | Nearly all mapper functions can fail and will then return NULL. Add checks to all callers.
* path: replaced mpd_basename() with g_path_get_basename()Max Kellermann2008-10-20
| | | | | | GLib's g_path_get_basename() is much more reliable than mpd_basename(). The latter could be tricked into an assertion failure.
* update: don't skip hidden filesMax Kellermann2008-10-15
| | | | | Skip only the special directory entries "." and "..", don't skip all other "hidden" files.
* command: added command "idle"Max Kellermann2008-10-14
| | | | | | "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.
* update: don't follow relative symlinksMax Kellermann2008-10-14
| | | | | | 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.
* mapper: new song-to-filesystem mapper libraryMax Kellermann2008-10-14
| | | | | | 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.
* update: always look up parent directory in updatePath()Max Kellermann2008-10-13
| | | | | | | By always creating the parent directory, we can use delete_name_in() without further lookups. The parents which may non exist will be pruned later. An update request for a non-existing or empty directory should be quite unusual, so this doesn't add any measurable overhead.
* update: pass base file name to updateInDirectory()Max Kellermann2008-10-13
| | | | | | In order to optimize buffer usage, pass only the base file name to updateInDirectory(). This way, updateInDirectory() may choose when to allocate a larger buffer for the full path.
* update: moved code to make_subdir()Max Kellermann2008-10-13
|
* update: added delete_name_in()Max Kellermann2008-10-13
| | | | | delete_name_in() is similar to delete_path(), but it does not need to look up the parent directory.
* update: allow music_root updates to be queuedEric Wong2008-10-13
| | | | | | Previously only updates with subdirectories being specified could be queued. No harm in queueing full updates.
* update: replaced update_return with global "modified" flagMax Kellermann2008-10-09
| | | | | | | There is only once update thread at a time. Make the "modified" flag global and remove the return values of most functions. Propagating an error is only useful for updateDirectory(), since updateInDirectory() will delete failed subdirectories.
* update: make the variable "progress" staticMax Kellermann2008-10-09
|
* update: don't print debug message when song was not modifiedMax Kellermann2008-10-09
| | | | | When a song file was not modified, MPD printed the debug message "not a directory or music", because the first "if" branch did not return.
* update: fix memory leak in directory_update_init()Max Kellermann2008-10-09
| | | | | When the update queue is full, directory_update_init() did not free the path argument.
* update: make the job id unsignedMax Kellermann2008-10-09
| | | | Since the return value cannot be -1 anymore, we can make it unsigned.
* update: job ID must be positiveMax Kellermann2008-10-09
| | | | | | | The documentation for directory_update_init() was incorrect: a job ID must be positive, not non-negative. If the update queue is full and no job was created, it makes more sense to return 0 instead of -1, because it is more consistent with the return value of isUpdatingDB().
* update: check progress!=IDLE in reap_update_task()Max Kellermann2008-10-09
| | | | | When the update task is idle, there is no need to check for deleted songs. Return early from reap_update_task().
* update: fixed stack corruption due to pthread_join() callMax Kellermann2008-10-09
| | | | | | pthread_join() expects a "pointer to a pointer" parameter, but it got a "pointer to an enum". On AMD64, an enum is smaller than a pointer, leading to a buffer overflow.
* updated: always call removeDeletedFromDirectory()Max Kellermann2008-10-09
| | | | | Removed the local variable "was_empty": don't remember if the directory is new. Always call removeDeletedFromDirectory().