Commit Graph

1757 Commits

Author SHA1 Message Date
J. Alexander Treuman
f16e372871 Make sure StoredPlaylists always contain UTF-8 paths that are either
relative paths in the DB or URLs.  The main functional difference is that
playlistmove and playlistdelete will rewrite playlists in the correct
encoding and remove invalid lines instead of potentially modifying them.
The specific changes are:

appendSongToStoredPlaylist:
* Don't convert to FS charset
* Don't prepend music_directory if saving absolute paths

writeStoredPlaylistToPath:
* Convert to FS charset
* Prepend music_directory if saving absolute paths

loadStoredPlaylist:
* Make sure each line is either in the DB or a URL

loadPlaylist:
* Don't bother checking paths, since it's done in loadStoredPlaylist now

git-svn-id: https://svn.musicpd.org/mpd/trunk@6266 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2007-05-26 14:09:09 +00:00
J. Alexander Treuman
f4d959a07b More formatting/error message cleanups in storedPlaylist.c.
git-svn-id: https://svn.musicpd.org/mpd/trunk@6265 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2007-05-26 00:48:53 +00:00
J. Alexander Treuman
fd645486a1 Don't call freeStoredPlaylist(sp) inside an if (!sp) block. It causes
segfaults.

git-svn-id: https://svn.musicpd.org/mpd/trunk@6264 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2007-05-26 00:28:07 +00:00
J. Alexander Treuman
fc094c08d3 Cleaning up formatting and error messages in storedPlaylist.c.
git-svn-id: https://svn.musicpd.org/mpd/trunk@6263 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2007-05-25 20:25:11 +00:00
J. Alexander Treuman
2814b7cfc6 Reverting to the full lsr API. Turns out the simple API needs all of the
audio at once, so it won't work for us.  The old full API code was still
heavily broken, as each call to pcm_convertSampleRate() used the same
state, even if it was processing two streams of audio.  The new code keeps
a separate state for each audio stream that's being converted.

git-svn-id: https://svn.musicpd.org/mpd/trunk@6255 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2007-05-24 21:15:37 +00:00
J. Alexander Treuman
7ba357a04e Adding rename command, for renaming stored playlists.
git-svn-id: https://svn.musicpd.org/mpd/trunk@6246 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2007-05-24 18:07:19 +00:00
J. Alexander Treuman
0d7d2ebf80 Cleaning up error messages in storedPlaylist.c.
git-svn-id: https://svn.musicpd.org/mpd/trunk@6245 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2007-05-24 17:25:21 +00:00
J. Alexander Treuman
c408bd5e90 Don't list playlists in lsinfo if the path isn't the root directory (they
can't be loaded anyway).

git-svn-id: https://svn.musicpd.org/mpd/trunk@6244 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2007-05-24 17:06:59 +00:00
J. Alexander Treuman
93b96edacc Adding a note to mpdconf.example about increasing buffer_before_play if you
hear skipping when changing songs.

git-svn-id: https://svn.musicpd.org/mpd/trunk@6240 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2007-05-23 14:13:46 +00:00
J. Alexander Treuman
4c8d69f058 Updating the audio_buffer_size and buffer_before_play entries in
mpd.conf.5.

git-svn-id: https://svn.musicpd.org/mpd/trunk@6239 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2007-05-23 14:10:58 +00:00
J. Alexander Treuman
cee4ba72e1 Changing some DEBUG/ERROR/FATAL messages in the JACK plugin.
git-svn-id: https://svn.musicpd.org/mpd/trunk@6232 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2007-05-23 12:24:12 +00:00
J. Alexander Treuman
bad8c806f1 Adding JACK documentation to mpd.conf.5.
git-svn-id: https://svn.musicpd.org/mpd/trunk@6231 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2007-05-23 12:07:40 +00:00
J. Alexander Treuman
495e1b6cf9 Tidying up pcm_utils.c a bit more.
git-svn-id: https://svn.musicpd.org/mpd/trunk@6230 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2007-05-23 11:04:04 +00:00
J. Alexander Treuman
fbb3a94f17 Switching to the lsr simple API. The problem with the full API is that the
number of channels is specified when the converter state is created.
Previously this was only done once, thus breaking horribly when the input
audio suddenly had a different channel count.  A new state could be created
every time the number of channels changes, but this could happen many times
a second if resampling to two different formats at once.  The simple API
doesn't have this problem, as channel count is an argument to the
conversion function itself.

git-svn-id: https://svn.musicpd.org/mpd/trunk@6229 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2007-05-23 10:31:07 +00:00
J. Alexander Treuman
a70ecdc00c Just specify mimeType as NULL in mpc's InputPlugin struct.
git-svn-id: https://svn.musicpd.org/mpd/trunk@6225 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2007-05-22 23:34:26 +00:00
J. Alexander Treuman
407497c40a Split pcm_convertAudioFormat into separate functions for bitrate, channel,
and samplerate conversion.  This makes the code much easier to read, and
fixes a few bugs that were previously there.

git-svn-id: https://svn.musicpd.org/mpd/trunk@6224 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2007-05-22 23:11:36 +00:00
J. Alexander Treuman
e6d7663b10 Cleaning up/correcting some comments.
git-svn-id: https://svn.musicpd.org/mpd/trunk@6200 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2007-05-22 15:21:56 +00:00
J. Alexander Treuman
f2850a66f0 Reindenting
git-svn-id: https://svn.musicpd.org/mpd/trunk@6199 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2007-05-22 15:02:25 +00:00
J. Alexander Treuman
92ff09881a Fail loading the playlist on errors mid-file. The same code is used for
playlistadd, playlistdelete, etc. and would've caused the playlist to be
rewritten only up to the line with the error.

git-svn-id: https://svn.musicpd.org/mpd/trunk@6133 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2007-05-16 20:35:13 +00:00
J. Alexander Treuman
a2a101004b Adding pat to AUTHORS.
git-svn-id: https://svn.musicpd.org/mpd/trunk@6129 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2007-05-16 19:47:32 +00:00
J. Alexander Treuman
6cfe421cd6 Committing pat's rewrite of the stored playlist code. This also adds two
new commands: playlistmove and playlistdelete.

git-svn-id: https://svn.musicpd.org/mpd/trunk@6116 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2007-05-16 12:02:10 +00:00
J. Alexander Treuman
6f68587ad5 Changing "//" comments to "/* */" comments.
git-svn-id: https://svn.musicpd.org/mpd/trunk@6112 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2007-05-15 23:23:09 +00:00
J. Alexander Treuman
f63c6ca86d Fixing some code that was rendered unreadable by indent.
git-svn-id: https://svn.musicpd.org/mpd/trunk@5955 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2007-04-26 00:48:37 +00:00
J. Alexander Treuman
472e70e74e Forgot to change the associated fdprintf format to %li.
git-svn-id: https://svn.musicpd.org/mpd/trunk@5952 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2007-04-26 00:13:14 +00:00
J. Alexander Treuman
dc4e2a3f5e Changing SearchStats.playTime from int to unsigned long.
git-svn-id: https://svn.musicpd.org/mpd/trunk@5951 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2007-04-26 00:11:30 +00:00
J. Alexander Treuman
7a8a9c10e1 Adding count command. It's usage is identical to find, but instead of
returning a list of matching songs, the number of results and total play
time of the results are returned.

git-svn-id: https://svn.musicpd.org/mpd/trunk@5950 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2007-04-25 23:46:11 +00:00
J. Alexander Treuman
7fd9859540 Adding ChangeLog entry for previous commit.
git-svn-id: https://svn.musicpd.org/mpd/trunk@5949 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2007-04-25 20:39:30 +00:00
J. Alexander Treuman
ebaa3f4338 Set directory_dbModTime when writing the db, so that it will be set after
initial db creation.

git-svn-id: https://svn.musicpd.org/mpd/trunk@5948 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2007-04-25 20:34:30 +00:00
J. Alexander Treuman
179ab7efe8 fials -> fails
git-svn-id: https://svn.musicpd.org/mpd/trunk@5947 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2007-04-25 20:18:47 +00:00
J. Alexander Treuman
18e20b8d2c Remove the now unused struct stat from initMp3Directory().
git-svn-id: https://svn.musicpd.org/mpd/trunk@5946 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2007-04-25 20:08:05 +00:00
J. Alexander Treuman
bf6da4f399 initMp3Directory() is only called when (re)creating the db, but before the
db file is written.  So don't try to set directory_dbModTime to the mtime
of the db file, since it will be incorrect.

git-svn-id: https://svn.musicpd.org/mpd/trunk@5945 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2007-04-25 20:06:47 +00:00
J. Alexander Treuman
f67b6b896f Removing references to options.updateDB in main.c.
git-svn-id: https://svn.musicpd.org/mpd/trunk@5944 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2007-04-25 18:47:34 +00:00
J. Alexander Treuman
bee795f2c1 mpd.conf.5 claimed the default alsa device was "hw:0,0", but it's actually
"default".

git-svn-id: https://svn.musicpd.org/mpd/trunk@5943 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2007-04-25 18:22:23 +00:00
José Anarch
51ec5b1542 Only a few changes in jack_playAudio.
git-svn-id: https://svn.musicpd.org/mpd/trunk@5909 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2007-04-11 17:41:10 +00:00
José Anarch
de5667b288 Now process and playAudio use mutexes.
git-svn-id: https://svn.musicpd.org/mpd/trunk@5897 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2007-04-09 20:18:11 +00:00
J. Alexander Treuman
95c411224a Don't allow "true" as a value for use_mmap for consistency with other "yes
or no" parameters.

git-svn-id: https://svn.musicpd.org/mpd/trunk@5896 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2007-04-09 13:05:50 +00:00
J. Alexander Treuman
745fa0c284 Noting the defaults for use_mmap and gapless_mp3_playback in mpd.conf.5.
git-svn-id: https://svn.musicpd.org/mpd/trunk@5895 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2007-04-09 13:01:18 +00:00
J. Alexander Treuman
b8341e6902 Cleaning up some comments.
git-svn-id: https://svn.musicpd.org/mpd/trunk@5894 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2007-04-09 12:24:48 +00:00
J. Alexander Treuman
f953c2cd37 Updating ChangeLog.
git-svn-id: https://svn.musicpd.org/mpd/trunk@5892 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2007-04-08 15:52:41 +00:00
J. Alexander Treuman
7dadabca8a When calling commandError(STDERR_FILENO, ...), don't set current_command to
NULL.  Doing so would mean future calls to commandError with a socket as an
argument will still write the error message to the error log, and not the
socket.

git-svn-id: https://svn.musicpd.org/mpd/trunk@5891 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2007-04-08 15:41:38 +00:00
J. Alexander Treuman
74e75378ae If current_command is NULL when calling commandError, print the error
message and trailing new line to STDERR_FILENO along with the ACK, instead
of sending them over the socket.

git-svn-id: https://svn.musicpd.org/mpd/trunk@5890 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2007-04-08 15:26:48 +00:00
J. Alexander Treuman
c825401760 Typo.
git-svn-id: https://svn.musicpd.org/mpd/trunk@5889 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2007-04-08 15:25:18 +00:00
Avuton Olrich
a061da8fb5 The massive copyright update
git-svn-id: https://svn.musicpd.org/mpd/trunk@5834 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2007-04-05 03:22:33 +00:00
J. Alexander Treuman
1bf233dd37 Removing Sun audio support from configure and ChangeLog. Turns out the
plugin itself was never actually committed, so support for it was never
there.

git-svn-id: https://svn.musicpd.org/mpd/trunk@5822 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2007-04-04 15:58:42 +00:00
J. Alexander Treuman
059494e8e4 Don't stop decoding when unpausing fails because no audio device can be
opened.  Instead just remain in paused state.

git-svn-id: https://svn.musicpd.org/mpd/trunk@5820 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2007-04-03 20:22:10 +00:00
J. Alexander Treuman
2caf18ad43 Reformatting some code.
git-svn-id: https://svn.musicpd.org/mpd/trunk@5819 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2007-04-03 20:10:22 +00:00
J. Alexander Treuman
f3e833af8e Adding ChangeLog entry for tagtypes command.
git-svn-id: https://svn.musicpd.org/mpd/trunk@5797 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2007-03-31 21:06:39 +00:00
J. Alexander Treuman
b1a93e8641 Updating metadata_to_use docs to be more consistent with tagtypes command.
git-svn-id: https://svn.musicpd.org/mpd/trunk@5793 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2007-03-31 20:40:57 +00:00
J. Alexander Treuman
e3e4964f59 Adding tagtypes command to list available tag types (takes metadata_to_use
into account).

git-svn-id: https://svn.musicpd.org/mpd/trunk@5792 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2007-03-31 18:43:16 +00:00
J. Alexander Treuman
2215c1796d Set totalTime to 0 for MODs. If this isn't done, the totalTime of the
previous song played will be reused.

git-svn-id: https://svn.musicpd.org/mpd/trunk@5791 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2007-03-31 18:07:27 +00:00