aboutsummaryrefslogtreecommitdiffstats
path: root/src/update.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* ls: moved generic URI utilities to uri.cMax Kellermann2009-02-251-1/+1
| | | | | "ls" is a bad name for a library which parses URIs. We'll move the rest of the "ls" library later.
* update: free deleted subdirectoriesMax Kellermann2009-02-121-2/+6
| | | | | | Use delete_directory() for removing sub directories instead of dirvec_clear(). This ensures that all memory occupied by subdirectories of deleted directories is freed.
* update: recursively purge deleted directoriesMax Kellermann2009-02-121-1/+1
| | | | | | | 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().
* update: check whether stickers are enabledMax Kellermann2009-02-041-1/+3
| | | | | If stickers are not configured at runtime, don't call sticker_song_delete().
* playlist: renamed global "playlist" variable to "g_playlist"Max Kellermann2009-02-041-2/+2
| | | | | | | 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.
* use g_free() instead of free()Max Kellermann2009-01-251-4/+3
| | | | | | 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.
* update: delete stickers of deleted songsMax Kellermann2009-01-191-0/+9
| | | | | | | 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).
* mapper: make the music_directory optionalMax Kellermann2009-01-181-0/+3
| | | | Without a music_directory, MPD is an excellent streaming client.
* update: removed one more stack bufferMax Kellermann2009-01-081-4/+2
|
* path: allocate buffer in fs_charset conversion functionsMax Kellermann2009-01-081-2/+6
| | | | | Don't use fixed static buffers. GLib allocates a new string for us anyway, let's just return this one instead of copying it.
* update: include config.h, fix archive codeMax Kellermann2009-01-081-6/+9
| | | | | The archive code was disabled, because config.h was not included and thus ENABLE_ARCHIVE was not defined.
* update: save the database even if it is emptyMax Kellermann2009-01-081-1/+2
| | | | Save an empty database, even if the music directory is empty.
* stats: added stats_update()Max Kellermann2009-01-041-3/+1
|
* update: use notify.h instead of condition.hMax Kellermann2009-01-041-12/+10
| | | | The notify library is easier to use, and has no disadvantages.
* update: refresh stats when database update is finishedMax Kellermann2009-01-041-0/+5
|
* update: splitted reap_update_task()Max Kellermann2009-01-041-17/+30
| | | | | | 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.
* initialize GError pointersMax Kellermann2009-01-041-1/+1
| | | | | GLib mandates that you initialize all GError objects with NULL prior to passing it.
* path: removed pfx_dir()Max Kellermann2009-01-041-6/+6
| | | | Use GLib's g_build_filename() instead of pfx_dir().
* song: allocate the result of song_get_url()Max Kellermann2009-01-041-2/+4
|
* directory: added directory_is_root()Max Kellermann2009-01-041-1/+1
| | | | | directory_is_root() is cheaper than isRootDirectory(directory_get_path()).
* ls: renamed functions, no CamelCaseMax Kellermann2009-01-041-1/+1
|
* update: removed struct delete_dataMax Kellermann2009-01-041-9/+3
| | | | The struct delete_data has only one member left and can be eliminated.
* ls: removed hasMusicSuffix() and get_archive_by_suffix()Max Kellermann2009-01-041-2/+8
| | | | | | | | 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-041-26/+35
|
* update: moved code to directory_exists(), fix typoMax Kellermann2009-01-041-9/+18
| | | | | 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-031-0/+15
| | | | | | 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-031-0/+1
|
* update: use GLib instead of utils.hMax Kellermann2009-01-021-4/+5
|
* mapper: allocate the result of map_directory_child_fs(), map_song_fs()Max Kellermann2009-01-021-14/+18
| | | | Don't use fixed stack buffers.
* mapper: allocate the result of map_uri_fs(), map_directory_fs()Max Kellermann2009-01-021-10/+18
| | | | Don't use fixed stack buffers.
* update: use g_file_test() instead of stat()Max Kellermann2009-01-021-3/+2
| | | | | 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-011-3/+6
| | | | | | | | | 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-011-2/+2
| | | | Continuing the previous patch.
* main_notify: renamed source to event_pipe.cMax Kellermann2009-01-011-1/+1
| | | | | | 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-291-18/+21
|
* removed os_compat.hMax Kellermann2008-12-291-0/+7
| | | | | 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-291-0/+4
|
* update & main_notify: migrate from pthread to glib threadsThomas Jansen2008-12-281-10/+11
|
* disable archive API without pluginsMax Kellermann2008-12-271-0/+7
| | | | | 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-271-1/+64
|\ | | | | | | | | | | | | | | Conflicts: configure.ac src/ls.h src/output/shout_plugin.c
| * update: adding archive updating related codeViliam Mateicka2008-12-161-1/+64
| |
* | update: default to follow all symlinksAvuton Olrich2008-12-081-1/+1
|/ | | | | | 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-281-7/+33
| | | | | | | | | 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-271-0/+8
| | | | | | 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-241-1/+1
|
* update: fixed shadow warning on "basename"Max Kellermann2008-11-221-6/+6
| | | | | Renamed the local variable "basename", which shadows the POSIX function basename().
* update: pass UTF-8 path to skip_symlink()Konstantin Sobolev2008-11-201-3/+2
| | | | | | 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-311-2/+6
| | | | | 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-201-5/+16
| | | | | | 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-151-3/+5
| | | | | Skip only the special directory entries "." and "..", don't skip all other "hidden" files.