- 15 Feb, 2009 1 commit
-
-
Max Kellermann authored
The decoder_plugin struct is used by both the MPD core and the decoder plugin implementations. Move it to a shared header file, to minimize header dependencies.
-
- 23 Jan, 2009 1 commit
-
-
Max Kellermann authored
Removed unused includes.
-
- 17 Jan, 2009 2 commits
-
-
Max Kellermann authored
If a song is not within the music directory ("file:///..."), it has no "parent directory". The archive code nonetheless dereferences the parent pointer, causing a segmentation fault. Check parent!=NULL.
-
Max Kellermann authored
Some plugins used the APE or ID3 tag loader as a fallback when their own methods of loading tags did not work. Move this code out of all decoder plugins, into song_file_update().
-
- 04 Jan, 2009 5 commits
-
-
Max Kellermann authored
-
Max Kellermann authored
directory_is_root() is cheaper than isRootDirectory(directory_get_path()).
-
Max Kellermann authored
-
Max Kellermann authored
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.
-
Max Kellermann authored
Newline characters are already checked in skip_path() (update.c).
-
- 03 Jan, 2009 1 commit
-
-
Max Kellermann authored
-
- 02 Jan, 2009 1 commit
-
-
Max Kellermann authored
Don't use fixed stack buffers.
-
- 29 Dec, 2008 1 commit
-
-
Max Kellermann authored
Only include headers which are really needed. os_compat.h aimed to make MPD easily portable, but was never actually made portable.
-
- 16 Dec, 2008 1 commit
-
-
Viliam Mateicka authored
-
- 01 Nov, 2008 1 commit
-
-
Max Kellermann authored
The decoder_plugin structs must never change. Don't work with non-const pointers.
-
- 31 Oct, 2008 1 commit
-
-
Max Kellermann authored
Nearly all mapper functions can fail and will then return NULL. Add checks to all callers.
-
- 15 Oct, 2008 2 commits
-
-
Max Kellermann authored
Don't load non-regular files.
-
Max Kellermann authored
Clients which have authenticated via unix socket may add local files to the MPD playlist, provided that they own the file.
-
- 14 Oct, 2008 2 commits
-
-
Max Kellermann authored
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.
-
Max Kellermann authored
song_get_url() doesn't modify the song object.
-
- 13 Oct, 2008 2 commits
-
-
Max Kellermann authored
isMusic() used to be a very inefficient function: with every invocation, it did another stat() on the specified file. There is only one caller, do the stat() there manually and use hasMusicSuffix() instead of isMusic().
-
Eric Wong authored
-
- 08 Oct, 2008 10 commits
-
-
Max Kellermann authored
CamelCase is ugly, rename the functions.
-
Max Kellermann authored
The runtime check suggests that the author has somehow thought song_get_url(NULL) might be valid. It should not be. Replace it with an assertion.
-
Max Kellermann authored
Eliminate duplicated code.
-
Max Kellermann authored
Instead of returning 0 or -1, return true on success and false on failure. This seems more natural, and when the C library was designed, there was no "bool" data type.
-
Max Kellermann authored
This function was never used on remote songs. Replace the runtime check with an assertion.
-
Max Kellermann authored
CamelCase is ugly... rename all functions.
-
Max Kellermann authored
Provide separate constructors for creating a remote song, a local song, and one for loading data from a song file. This way, we can add more assertions.
-
Max Kellermann authored
When there are standardized headers, use these instead of the bloated os_compat.h.
-
Max Kellermann authored
Again, a data type which can be forward-declared.
-
Max Kellermann authored
The struct can be forward-declared by other headers, which relaxes the header dependencies.
-
- 07 Oct, 2008 2 commits
-
-
Eric Wong authored
This makes the update code thread-safe and doesn't penalize the playlist code by complicating it with complicated and error-prone locks (and the associated overhead, not everybody has a thread-implementation as good as NPTL). The update task blocks during the delete; but the update task is a slow task anyways so we can block w/o people caring too much. This was also our only freeSong call site, so remove that function. Note that deleting entire directories is not fully thread-safe, yet; as their traversals are not yet locked.
-
Eric Wong authored
song objects cannot exist without a path or URL
-
- 06 Oct, 2008 5 commits
-
-
Eric Wong authored
We already know if a song is a URL or not based on whether it has parentDir defined or not. Hopefully one day in the future we can drop HTTP support from MPD entirely when an HTTP filesystem comes along and we can access streams via open(2).
-
Max Kellermann authored
The "packed" attribute may have negative side effects on performance. Remove the "packed" attribute, and increase the size of "song.url" to a multiple of the machine word size.
-
Eric Wong authored
Reduce the number of allocations we make, so there's less pressure on the allocator and less overhead to keep track of the allocations in.
-
Eric Wong authored
It didn't save us any lines of code nor did it do anything useful since we would overwrite everything anyways.
-
Eric Wong authored
There's no reason to scan the playlist for a song we just allocated.
-
- 29 Sep, 2008 2 commits
-
-
Max Kellermann authored
Why have a "_func" prefix on all method names? Also don't typedef the methods, there is no advantage in that.
-
Max Kellermann authored
Having an enum type is much nicer than an anonymous integer plus CPP macros. Note that the old code didn't save any space by declaring the variable 8 bit, due to padding.
-