aboutsummaryrefslogtreecommitdiffstats
path: root/src/update.c (unfollow)
Commit message (Collapse)AuthorFilesLines
2009-03-14Removed superfluous if statement in update.c:453Jochen Keil1-28/+22
Check for NULL not necessary here
2009-03-13all: Update copyright header.Avuton Olrich1-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.
2009-03-10Cleaned up update_regular_file() method in update.cJochen Keil1-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.
2009-03-09Fix remove-flac-song-on-every-updateJochen Keil1-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
2009-03-09Initial support for embedded cue sheets found in flac filesJochen Keil1-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.
2009-03-09decoder_plugin: added method container_scan()Jochen Keil1-18/+94
[mk: fixed whitespace errors; use delete_song() instead of songvec_delete()]
2009-02-28update: use G_FILE_TEST_IS_REGULAR for archive filesMax Kellermann1-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.
2009-02-28update: don't update unchanged archiveMax Kellermann1-1/+6
When the mtime of an archive time hasn't changed, don't update it again.
2009-02-28directory: added "mtime" propertyMax Kellermann1-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.
2009-02-28update: moved code to update_archive_file()Max Kellermann1-31/+50
Simplify the rather large function update_regular_file().
2009-02-27update: print error when opendir() failsMax Kellermann1-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.
2009-02-25ls: moved generic URI utilities to uri.cMax Kellermann1-1/+1
"ls" is a bad name for a library which parses URIs. We'll move the rest of the "ls" library later.
2009-02-12update: free deleted subdirectoriesMax Kellermann1-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.
2009-02-12update: recursively purge deleted directoriesMax Kellermann1-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().
2009-02-04update: check whether stickers are enabledMax Kellermann1-1/+3
If stickers are not configured at runtime, don't call sticker_song_delete().
2009-02-04playlist: renamed global "playlist" variable to "g_playlist"Max Kellermann1-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.
2009-01-25use g_free() instead of free()Max Kellermann1-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.
2009-01-19update: delete stickers of deleted songsMax Kellermann1-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).
2009-01-18mapper: make the music_directory optionalMax Kellermann1-0/+3
Without a music_directory, MPD is an excellent streaming client.
2009-01-08update: removed one more stack bufferMax Kellermann1-4/+2
2009-01-08path: allocate buffer in fs_charset conversion functionsMax Kellermann1-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.
2009-01-08update: include config.h, fix archive codeMax Kellermann1-6/+9
The archive code was disabled, because config.h was not included and thus ENABLE_ARCHIVE was not defined.
2009-01-08update: save the database even if it is emptyMax Kellermann1-1/+2
Save an empty database, even if the music directory is empty.
2009-01-04stats: added stats_update()Max Kellermann1-3/+1
2009-01-04update: use notify.h instead of condition.hMax Kellermann1-12/+10
The notify library is easier to use, and has no disadvantages.
2009-01-04update: refresh stats when database update is finishedMax Kellermann1-0/+5
2009-01-04update: splitted reap_update_task()Max Kellermann1-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.
2009-01-04initialize GError pointersMax Kellermann1-1/+1
GLib mandates that you initialize all GError objects with NULL prior to passing it.
2009-01-04path: removed pfx_dir()Max Kellermann1-6/+6
Use GLib's g_build_filename() instead of pfx_dir().
2009-01-04song: allocate the result of song_get_url()Max Kellermann1-2/+4
2009-01-04directory: added directory_is_root()Max Kellermann1-1/+1
directory_is_root() is cheaper than isRootDirectory(directory_get_path()).
2009-01-04ls: renamed functions, no CamelCaseMax Kellermann1-1/+1
2009-01-04update: removed struct delete_dataMax Kellermann1-9/+3
The struct delete_data has only one member left and can be eliminated.
2009-01-04ls: removed hasMusicSuffix() and get_archive_by_suffix()Max Kellermann1-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.
2009-01-04update: moved code to update_regular_file()Max Kellermann1-26/+35
2009-01-04update: moved code to directory_exists(), fix typoMax Kellermann1-9/+18
Reverse the condition: delete directories which don't exist anymore. This typo caused a slowdown during partial database update.
2009-01-03update: don't check for symlinks on WIN32Max Kellermann1-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.
2009-01-03event_pipe: moved variable "main_task" to main.cMax Kellermann1-0/+1
2009-01-02update: use GLib instead of utils.hMax Kellermann1-4/+5
2009-01-02mapper: allocate the result of map_directory_child_fs(), map_song_fs()Max Kellermann1-14/+18
Don't use fixed stack buffers.
2009-01-02mapper: allocate the result of map_uri_fs(), map_directory_fs()Max Kellermann1-10/+18
Don't use fixed stack buffers.
2009-01-02update: use g_file_test() instead of stat()Max Kellermann1-3/+2
If we want to check whether a file is a directory, use GLib's g_file_test() instead of stat().
2009-01-01event_pipe: added pipe_event enum and callbacksMax Kellermann1-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.
2009-01-01event_pipe: renamed functions from main_notify_* to event_pipe_*Max Kellermann1-2/+2
Continuing the previous patch.
2009-01-01main_notify: renamed source to event_pipe.cMax Kellermann1-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.
2008-12-29update: use GLib loggingMax Kellermann1-18/+21
2008-12-29removed os_compat.hMax Kellermann1-0/+7
Only include headers which are really needed. os_compat.h aimed to make MPD easily portable, but was never actually made portable.
2008-12-29update: fixing empty filenames in archivesViliam Mateicka1-0/+4
2008-12-28update & main_notify: migrate from pthread to glib threadsThomas Jansen1-10/+11
2008-12-27disable archive API without pluginsMax Kellermann1-0/+7
When there are no archive plugins, we do not need the archive API at all. Drop all its overhead.