1. 26 Mar, 2008 1 commit
  2. 20 Mar, 2008 1 commit
  3. 25 Feb, 2008 1 commit
    • Eric Wong's avatar
      Update ChangeLog and TODO · 7d574703
      Eric Wong authored
      ChangeLog and TODO have been updated to reflect "addid"
      improvement.
      
      esd support has been removed from the TODO, PulseAudio
      supercedes esd and we already have a PulseAudio output.
      
      Moving NAS, SUN, OSX mixer/output off into the unknown because
      nobody seems to use them or care enough to implement them (I
      sure don't).
      
      git-svn-id: https://svn.musicpd.org/mpd/trunk@7187 09075e82-0dd4-0310-85a5-a0d7c8717e4f
      7d574703
  4. 05 Feb, 2008 3 commits
  5. 29 Jan, 2008 1 commit
  6. 27 Jan, 2008 3 commits
  7. 26 Jan, 2008 14 commits
    • Eric Wong's avatar
      Revert the queue implementation and commands · 688289b2
      Eric Wong authored
      It's too ugly and broken (both technically and usability-wise)
      to be worth supporting in any stable release.
      
      In one sentence: The queue is a very crippled version of the
      playlist that takes precedence over the normal playlist.
      
      How is it crippled?
      
      * The "queueid" command only allows the queuing of songs
      ALREADY IN THE PLAYLIST!  This promotes having the entire mpd
      database of songs in the playlist, which is a stupid practice
      to begin with.
      
      * It doesn't allow for meaningful rearranging and movement
      of songs within the queue.  To move a song, you'd need to
      dequeue and requeue it (and other songs on the list).
      Why?  The playlist already allows _all_ these features
      and shows everything a client needs to know about the ordering
      of songs in a _single_ command!
      
      * Random was a stupid idea to begin with and unfortunately
      we're stuck supporting it since we've always had it.  Users
      should learn to use "shuffle" instead and not look at their
      playlists.  Implementing queue because we have the problem of
      random is just a bandage fix and digging ourselves a new hole.
      
      This protocol addition was never in a stable release of mpd, so
      reverting it will only break things for people following trunk;
      which I'm not too worried about.  I am however worried about
      long-term support of this misfeature, so I'm removing it.
      
      Additionally, there are other points:
      
      * It's trivially DoS-able:
      
      (while true; do echo queueid $song_id; done) | nc $MPD_HOST $MPD_PORT
      
      The above commands would cause the queue to become infinitely
      expanding, taking up all available memory in the system.  The
      mpd playlist was implemented as an array with a fixed (but
      configurable) size limit for this reason.
      
      * It's not backwards-compatible.  All clients would require
      upgrades (and additional complexity) to even know what the
      next song in the playlist is.  mpd is a shared architecture,
      and we should not violate the principle of least astonishment
      here.
      
      This removes the following commands:
      queueid, dequeue, queueinfo
      
      Additionally, the status field of "playlistqueue: " is removed
      from the status command.
      
      While this DoS is trivial to fix, the design is simply too
      broken to ever support in a real release.
      
      The overloading of the "addid" command and the allowing of
      negative numbers to be used as offsets is far more flexible.
      
      This improved "addid" is completely backwards-compatible with
      all clients, and does not require clients to have UI changes or
      run additional commands to display the queue.
      
      git-svn-id: https://svn.musicpd.org/mpd/trunk@7155 09075e82-0dd4-0310-85a5-a0d7c8717e4f
      688289b2
    • Eric Wong's avatar
      storedPlaylist: prevent potential DoS from stored playlist commands · 29df7036
      Eric Wong authored
      While mpd has always protected against the infinite expansion of
      the main playlist by limiting its size in memory, however the
      new storedPlaylist code has never checked for this limit.
      
      Malicious (or clumsy) users could repeatedly append songs to
      stored playlists, causing files to grow increasingly large
      on disk.  Attempting to load extremely large files into memory
      will require mpd to slurp that all into memory, and ultimately
      the file would be unusable by mpd because of the configurable
      playlist size limit.
      
      Now we limit stored playlists to the max_playlist_length
      configuration variable set by the user (default is 16384).  We
      will refuse to append to playlist files if they hit that limit;
      and also refuse to load more than the specified amount of songs
      into memory.
      
      git-svn-id: https://svn.musicpd.org/mpd/trunk@7154 09075e82-0dd4-0310-85a5-a0d7c8717e4f
      29df7036
    • Eric Wong's avatar
      playlist: don't allow no-op/senseless movement of songs · 3a1b3e38
      Eric Wong authored
      This disables moving the bonkered moving of the current song to
      a (negative) offset of itself (introduced in the last commit).
      
      This also short circuits no-op moves when (from == to) and
      avoid needless increasing of the playlist version and causes
      clients to issue pointless no-op plchanges commands.
      
      git-svn-id: https://svn.musicpd.org/mpd/trunk@7153 09075e82-0dd4-0310-85a5-a0d7c8717e4f
      3a1b3e38
    • Eric Wong's avatar
      playlist: allow move to specify offset from current song · e213ca4f
      Eric Wong authored
      If (and only if) there is a current song in the playlist,
      (player could be stopped), allow the move destination
      argument to be specified as a negative number.
      
      This means moving any song (besides the current one) to the -1
      position will allow it to be moved to the next song in the
      playlist.  Moving any song to position -2 will move it
      to the song after the next, and so forth.
      
      Moving a song to -playlist.length will move it to the song
      _before_ the current song on the playlist; so this will
      work for repeating playlists, too.
      
      git-svn-id: https://svn.musicpd.org/mpd/trunk@7152 09075e82-0dd4-0310-85a5-a0d7c8717e4f
      e213ca4f
    • Eric Wong's avatar
      command: allow "addid" command to take an optional second argument, position · 9eee1a81
      Eric Wong authored
      This will allow "addid \"song_url\" <pos>" to atomically insert a
      song at any given playlist position.
      
      If the add succeeds, but the actual movement fails (due to
      invalid position), then the song_id will be deleted before
      the command returns back to the client, and the client
      will get an error response.
      
      git-svn-id: https://svn.musicpd.org/mpd/trunk@7151 09075e82-0dd4-0310-85a5-a0d7c8717e4f
      9eee1a81
    • Eric Wong's avatar
      command: cleanup integer argument validation for commands · 2889b576
      Eric Wong authored
      git-svn-id: https://svn.musicpd.org/mpd/trunk@7150 09075e82-0dd4-0310-85a5-a0d7c8717e4f
      2889b576
    • Eric Wong's avatar
      addToPlaylist/addSongToPlaylist: printId argument changed to added_id · 2f0e5bfd
      Eric Wong authored
      Instead of printing out the Id from playlist.c, instead set
      the integer that added_id poitns to if added_id is non-NULL.
      
      This makes the API cleaner and will allow us to use additional
      commands to manipulate the newly-added song_id.  Callers
      (handleAddId) that relied on printId to print it to the given
      fd have now been modified to print the ID at a higher-level;
      making playlist.c less-dependent on protocol details.
      
      git-svn-id: https://svn.musicpd.org/mpd/trunk@7149 09075e82-0dd4-0310-85a5-a0d7c8717e4f
      2f0e5bfd
    • Eric Wong's avatar
      gcc.h: support mpd_fprintf__, with arguments shifted even further right · 2dafd9cd
      Eric Wong authored
      This will be used to check errors in command.c
      
      git-svn-id: https://svn.musicpd.org/mpd/trunk@7148 09075e82-0dd4-0310-85a5-a0d7c8717e4f
      2dafd9cd
    • Eric Wong's avatar
      Cleanup checking for tests in src/ when building in separate dir · 262e515b
      Eric Wong authored
      git-svn-id: https://svn.musicpd.org/mpd/trunk@7147 09075e82-0dd4-0310-85a5-a0d7c8717e4f
      262e515b
    • Max Kellermann's avatar
      fixed "comparison between signed and unsigned" · c3ba1bb9
      Max Kellermann authored
      Signed-off-by: 's avatarEric Wong <normalperson@yhbt.net>
      
      git-svn-id: https://svn.musicpd.org/mpd/trunk@7146 09075e82-0dd4-0310-85a5-a0d7c8717e4f
      c3ba1bb9
    • Max Kellermann's avatar
      fix -Waggregate-return · 0659d359
      Max Kellermann authored
      Signed-off-by: 's avatarEric Wong <normalperson@yhbt.net>
      
      git-svn-id: https://svn.musicpd.org/mpd/trunk@7145 09075e82-0dd4-0310-85a5-a0d7c8717e4f
      0659d359
    • Max Kellermann's avatar
      assume old flac api when FLAC_API_VERSION_CURRENT is not defined · 07eaad30
      Max Kellermann authored
      the code is inconsistent when FLAC_API_VERSION_CURRENT is not defined:
      sometimes version > 7 is assumed, and sometimes version <= 7.  solve
      this by assuming the version is old when FLAC_API_VERSION_CURRENT is
      not defined.
      Signed-off-by: 's avatarEric Wong <normalperson@yhbt.net>
      
      git-svn-id: https://svn.musicpd.org/mpd/trunk@7144 09075e82-0dd4-0310-85a5-a0d7c8717e4f
      07eaad30
    • Max Kellermann's avatar
      fixed -Wshadow warnings · 07adb14e
      Max Kellermann authored
      Signed-off-by: 's avatarEric Wong <normalperson@yhbt.net>
      
      git-svn-id: https://svn.musicpd.org/mpd/trunk@7143 09075e82-0dd4-0310-85a5-a0d7c8717e4f
      07adb14e
    • Max Kellermann's avatar
      fixed invalid C prototypes · 28008e69
      Max Kellermann authored
      Signed-off-by: 's avatarEric Wong <normalperson@yhbt.net>
      
      git-svn-id: https://svn.musicpd.org/mpd/trunk@7142 09075e82-0dd4-0310-85a5-a0d7c8717e4f
      28008e69
  8. 03 Jan, 2008 8 commits
  9. 01 Jan, 2008 8 commits