aboutsummaryrefslogtreecommitdiffstats
path: root/src/update.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* DatabaseGlue: add function db_is_simple()Max Kellermann2012-08-081-1/+1
| | | | Preparing for non-"simple" database plugins.
* update_internal.h: split headerMax Kellermann2012-06-131-1/+6
|
* update_remove: add header update_remove.hMax Kellermann2012-02-121-0/+1
|
* database: return GError on failureMax Kellermann2011-09-091-2/+8
|
* copyright year 2011Max Kellermann2011-01-291-1/+1
|
* eliminate g_error() usageThomas Jansen2010-09-251-1/+2
| | | | | | | | | | | | | | Replaced all occurrences of g_error() with MPD_ERROR() located in a new header file 'mpd_error.h'. This macro uses g_critical() to print the error message and then exits gracefully in contrast to g_error() which would internally call abort() to produce a core dump. The macro name is distinctive and allows to find all places with dubious error handling. The long-term goal is to get rid of MPD_ERROR() altogether. To facilitate the eventual removal of this macro it was added in a new header file rather than to an existing header file. This fixes #2995 and #3007.
* update: log start/finish of the update threadMax Kellermann2010-02-271-1/+11
|
* Update copyright notices.Avuton Olrich2009-12-311-1/+1
|
* include config.h in all sourcesMax Kellermann2009-11-121-1/+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.
* added missing config.h includes for extended LFS supportMax Kellermann2009-11-111-1/+0
| | | | | All sources which might work with large files must include config.h, to get Large File Support on 32 bit platforms.
* update: removed unused variable "update_notify"Max Kellermann2009-11-021-8/+0
| | | | | That variable has been superseded by "remove_notify" (defined in update_remove.c).
* command: added command "rescan"Max Kellermann2009-09-241-4/+8
| | | | | "rescan" is the same as "update", but it discards existing songs in the database.
* update: splitted update.c into several sourcesMax Kellermann2009-09-241-770/+17
|
* update: pass const string to update_enqueue()Max Kellermann2009-09-241-7/+11
| | | | | Duplicate the path string within update.c, do not expect an allocated string as parameter.
* update: renamed directory_update_init() to update_enqueue()Max Kellermann2009-09-241-1/+1
|
* Merged release 0.15.3 from branch 'v0.15.x'Max Kellermann2009-08-301-1/+2
|\ | | | | | | | | | | | | Conflicts: NEWS configure.ac
| * update: don't re-read unchanged container filesIgor Kuzmin2009-08-191-1/+2
| | | | | | | | | | | | | | MPD checks if every flac (possibly other types as well) file contains cuesheet on every update, which produces unneeded I/O. My music collection is on NFS share, so it's quite noticeable. IMHO, it shouldn't re-read unchanged files, so I wrote simple patch to fix it.
* | Merged release 0.15.2 from branch 'v0.15.x'Max Kellermann2009-08-151-3/+8
|\| | | | | | | | | | | | | Conflicts: NEWS configure.ac
| * update: free temporary string in container scan (memleak)Max Kellermann2009-08-141-2/+6
| | | | | | | | The return value of map_directory_child_fs() must be freed.
| * update: free empty path string (memleak)Max Kellermann2009-08-141-1/+2
| | | | | | | | | | When you pass an empty string to directory_update_init(), it was not freed by update_task().
* | playlist: CamelCaseIsBadCourtney Cavin2009-07-281-1/+1
| | | | | | | | Renamed all playlist functions to non-CamelCase.
* | playlist: no CamelCaseMax Kellermann2009-07-141-1/+1
| |
* | idle: added "update" eventMax Kellermann2009-07-051-0/+5
|/ | | | | | | | | Some clients have visual feedback for "database update is running". Using the "database" idle event is unreliable, because it is only emitted when the database was actually modified. This patch adds the "update" event, which is emitted when the update is started, and again when the update is finished, disregarding whether it has been modified.
* Removed superfluous if statement in update.c:453Jochen Keil2009-03-141-28/+22
| | | | Check for NULL not necessary here
* all: Update copyright header.Avuton Olrich2009-03-131-7/+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.
* Cleaned up update_regular_file() method in update.cJochen Keil2009-03-101-83/+88
| | | | | | | After adding the container_scan() method the update_regular_file() method was quite hard to read. Now there's update_container_file() which deals with container files. That way normal container files (i.e. without embedded tracks) are handled by the old code like a regular file. This will fix some of the odd behaviour observed.
* Fix remove-flac-song-on-every-updateJochen Keil2009-03-091-7/+7
| | | | | | | Until now every flac file got removed unconditionally (and then re-added) whenever the update command was issued. Now there is a check if we need to that, so the file will only be removed if there is a embedded cuesheet in that file
* Initial support for embedded cue sheets found in flac filesJochen Keil2009-03-091-1/+1
| | | | | | | | | So far only seekpoints are supported, so no proper tagging yet except for track number and track length. Tagging should be done by parsing the cue sheet which is often embedded as vorbis comment in flac files. Furthermore the pathname should be configurable like "%A - %t - %T", where %A means Artist, %t track number and %T Title or so.
* decoder_plugin: added method container_scan()Jochen Keil2009-03-091-18/+94
| | | | | [mk: fixed whitespace errors; use delete_song() instead of songvec_delete()]
* update: use G_FILE_TEST_IS_REGULAR for archive filesMax Kellermann2009-02-281-1/+6
| | | | | | | | | When checking whether database entries have been deleted, don't check if an archive file is a directory (G_FILE_TEST_IS_DIR), use G_FILE_TEST_IS_REGULAR for this case instead. To determine if a "struct directory" is an archive, check for device==DEVICE_INARCHIVE. This is always false after loading the database, so this patch is not complete yet.
* update: don't update unchanged archiveMax Kellermann2009-02-281-1/+6
| | | | | When the mtime of an archive time hasn't changed, don't update it again.
* directory: added "mtime" propertyMax Kellermann2009-02-281-1/+7
| | | | | | Remember the modification time of each directory. This is important for archives (which are virtual directories right now), but may also be useful for an automatic update mechanism.
* update: moved code to update_archive_file()Max Kellermann2009-02-281-31/+50
| | | | Simplify the rather large function update_regular_file().
* update: print error when opendir() failsMax Kellermann2009-02-271-2/+7
| | | | | | | MPD used to be silent when it could stat() a directory, but could not opendir() it to read its contents. This caused a lot of support headache with users who have wrong file permissions. Add another warning message.
* 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.