Hello community, here is the log from the commit of package ghc-libmpd for openSUSE:Factory checked in at 2020-10-23 15:14:16 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/ghc-libmpd (Old) and /work/SRC/openSUSE:Factory/.ghc-libmpd.new.3463 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "ghc-libmpd" Fri Oct 23 15:14:16 2020 rev:3 rq:842754 version:0.9.2.0 Changes: -------- --- /work/SRC/openSUSE:Factory/ghc-libmpd/ghc-libmpd.changes 2020-08-28 21:34:36.472701909 +0200 +++ /work/SRC/openSUSE:Factory/.ghc-libmpd.new.3463/ghc-libmpd.changes 2020-10-23 15:14:19.278133482 +0200 @@ -1,0 +2,11 @@ +Tue Oct 6 08:56:03 UTC 2020 - [email protected] + +- Update libmpd to version 0.9.2.0. + * v0.9.2.0 + - New command: `seekCur` + - Add `newtype Sign` to pass positive numbers to `MPDArg` with leading `+/-`. + - Add monadic versions of `deleteRange` and `moveRange` commands (previously + only had applicative versions) + - Deprecate `<&>`, use `<>` instead. `<&>` will be removed in the next major version. + +------------------------------------------------------------------- Old: ---- libmpd-0.9.1.0.tar.gz New: ---- libmpd-0.9.2.0.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ ghc-libmpd.spec ++++++ --- /var/tmp/diff_new_pack.izfYdQ/_old 2020-10-23 15:14:21.482134546 +0200 +++ /var/tmp/diff_new_pack.izfYdQ/_new 2020-10-23 15:14:21.482134546 +0200 @@ -19,7 +19,7 @@ %global pkg_name libmpd %bcond_with tests Name: ghc-%{pkg_name} -Version: 0.9.1.0 +Version: 0.9.2.0 Release: 0 Summary: An MPD client library License: MIT ++++++ libmpd-0.9.1.0.tar.gz -> libmpd-0.9.2.0.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libmpd-0.9.1.0/changelog.md new/libmpd-0.9.2.0/changelog.md --- old/libmpd-0.9.1.0/changelog.md 2020-01-27 07:10:31.000000000 +0100 +++ new/libmpd-0.9.2.0/changelog.md 2020-10-02 11:28:36.000000000 +0200 @@ -1,3 +1,10 @@ +* v0.9.2.0 + - New command: `seekCur` + - Add `newtype Sign` to pass positive numbers to `MPDArg` with leading `+/-`. + - Add monadic versions of `deleteRange` and `moveRange` commands (previously + only had applicative versions) + - Deprecate `<&>`, use `<>` instead. `<&>` will be removed in the next major version. + * v0.9.1.0 - Support partition in Network.MPD.Status - Ignore unknown key-value pairs in Network.MPD.status so that it breaks much less often. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libmpd-0.9.1.0/libmpd.cabal new/libmpd-0.9.2.0/libmpd.cabal --- old/libmpd-0.9.1.0/libmpd.cabal 2020-01-27 07:10:31.000000000 +0100 +++ new/libmpd-0.9.2.0/libmpd.cabal 2020-10-02 11:28:41.000000000 +0200 @@ -1,5 +1,5 @@ Name: libmpd -Version: 0.9.1.0 +Version: 0.9.2.0 Synopsis: An MPD client library. Description: A client library for MPD, the Music Player Daemon. Category: Network, Sound diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libmpd-0.9.1.0/src/Network/MPD/Applicative/CurrentPlaylist.hs new/libmpd-0.9.2.0/src/Network/MPD/Applicative/CurrentPlaylist.hs --- old/libmpd-0.9.1.0/src/Network/MPD/Applicative/CurrentPlaylist.hs 2019-09-27 18:56:33.000000000 +0200 +++ new/libmpd-0.9.2.0/src/Network/MPD/Applicative/CurrentPlaylist.hs 2020-10-02 11:26:25.000000000 +0200 @@ -71,7 +71,6 @@ delete :: Position -> Command () delete pos = Command emptyResponse ["delete" <@> pos] --- XXX: this does not exist in the monadic version -- | Delete a range of songs from the playlist. deleteRange :: (Position, Position) -> Command () deleteRange range = Command emptyResponse ["delete" <@> range] diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libmpd-0.9.1.0/src/Network/MPD/Applicative/PlaybackControl.hs new/libmpd-0.9.2.0/src/Network/MPD/Applicative/PlaybackControl.hs --- old/libmpd-0.9.1.0/src/Network/MPD/Applicative/PlaybackControl.hs 2019-09-27 18:56:33.000000000 +0200 +++ new/libmpd-0.9.2.0/src/Network/MPD/Applicative/PlaybackControl.hs 2020-10-02 11:26:25.000000000 +0200 @@ -20,6 +20,7 @@ , previous , seek , seekId + , seekCur , stop ) where @@ -57,6 +58,15 @@ seekId :: Id -> FractionalSeconds -> Command () seekId id' time = Command emptyResponse ["seekid" <@> id' <++> time] +-- | Seek to time in the current song. Absolute time for True in +-- the frist argument, relative time for False. +-- +-- @since 0.9.2.0 +seekCur :: Bool -> FractionalSeconds -> Command () +seekCur bool time + | bool = Command emptyResponse ["seekcur" <@> time] + | otherwise = Command emptyResponse ["seekcur" <@> (Sign time)] + -- | Stop playback. stop :: Command () stop = Command emptyResponse ["stop"] diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libmpd-0.9.1.0/src/Network/MPD/Commands/Arg.hs new/libmpd-0.9.2.0/src/Network/MPD/Commands/Arg.hs --- old/libmpd-0.9.1.0/src/Network/MPD/Commands/Arg.hs 2019-09-27 18:56:33.000000000 +0200 +++ new/libmpd-0.9.2.0/src/Network/MPD/Commands/Arg.hs 2020-10-02 11:26:25.000000000 +0200 @@ -12,7 +12,7 @@ Prepare command arguments. -} -module Network.MPD.Commands.Arg (Command, Args(..), MPDArg(..), (<++>), (<@>)) where +module Network.MPD.Commands.Arg (Command, Args(..), MPDArg(..), (<++>), (<@>),Sign(..)) where import Network.MPD.Util (showBool) @@ -77,6 +77,17 @@ instance MPDArg Bool where prep = Args . return . showBool instance MPDArg Double +-- | Wrapper for creating signed instances of MPDArg. +-- +-- @since 0.9.2.0 +newtype Sign a = Sign {unSign :: a} + deriving (Show) + +instance (Num a,Ord a,Show a) => MPDArg (Sign a) where + prep sx | x >= 0 = Args ["+" ++ show x] + | otherwise = Args [show x] + where x = unSign sx + addSlashes :: String -> String addSlashes = concatMap escapeSpecial where specials = "\\\"" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libmpd-0.9.1.0/src/Network/MPD/Commands/CurrentPlaylist.hs new/libmpd-0.9.2.0/src/Network/MPD/Commands/CurrentPlaylist.hs --- old/libmpd-0.9.1.0/src/Network/MPD/Commands/CurrentPlaylist.hs 2019-09-27 18:56:33.000000000 +0200 +++ new/libmpd-0.9.2.0/src/Network/MPD/Commands/CurrentPlaylist.hs 2020-10-02 11:26:25.000000000 +0200 @@ -17,8 +17,10 @@ , add , clear , delete + , deleteRange , deleteId , move + , moveRange , moveId , playlist , playlistFind @@ -63,6 +65,12 @@ delete :: MonadMPD m => Position -> m () delete = A.runCommand . A.delete +-- | Remove a range of songs from the current playlist. +-- +-- @since 0.9.2.0 +deleteRange :: MonadMPD m => (Position, Position) -> m () +deleteRange = A.runCommand . A.deleteRange + -- | Remove a song from the current playlist. deleteId :: MonadMPD m => Id -> m () deleteId = A.runCommand . A.deleteId @@ -71,6 +79,12 @@ move :: MonadMPD m => Position -> Position -> m () move pos = A.runCommand . A.move pos +-- | Move a range of songs to a given position in the current playlist. +-- +-- @since 0.9.2.0 +moveRange :: MonadMPD m => (Position, Position) -> Position -> m () +moveRange range = A.runCommand . A.moveRange range + -- | Move a song from (songid) to (playlist index) in the playlist. If to is -- negative, it is relative to the current song in the playlist (if there is one). moveId :: MonadMPD m => Id -> Position -> m () diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libmpd-0.9.1.0/src/Network/MPD/Commands/Extensions.hs new/libmpd-0.9.2.0/src/Network/MPD/Commands/Extensions.hs --- old/libmpd-0.9.1.0/src/Network/MPD/Commands/Extensions.hs 2019-09-27 18:56:33.000000000 +0200 +++ new/libmpd-0.9.2.0/src/Network/MPD/Commands/Extensions.hs 2020-10-02 11:28:29.000000000 +0200 @@ -23,6 +23,7 @@ import Control.Monad (liftM) import Data.Traversable (for) import Data.Foldable (for_) +import Data.Semigroup ((<>)) -- | This is exactly the same as `update`. updateId :: MonadMPD m => Maybe Path -> m Integer @@ -88,7 +89,7 @@ -- | List the songs in an album of some artist. listAlbum :: MonadMPD m => Artist -> Album -> m [Song] -listAlbum artist album = find (Artist =? artist <&> Album =? album) +listAlbum artist album = find (Artist =? artist <> Album =? album) -- | Retrieve the current playlist. -- Equivalent to @playlistinfo Nothing@. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libmpd-0.9.1.0/src/Network/MPD/Commands/PlaybackControl.hs new/libmpd-0.9.2.0/src/Network/MPD/Commands/PlaybackControl.hs --- old/libmpd-0.9.1.0/src/Network/MPD/Commands/PlaybackControl.hs 2019-09-27 18:56:33.000000000 +0200 +++ new/libmpd-0.9.2.0/src/Network/MPD/Commands/PlaybackControl.hs 2020-10-02 11:26:25.000000000 +0200 @@ -20,6 +20,7 @@ , previous , seek , seekId + , seekCur , stop ) where @@ -56,6 +57,13 @@ seekId :: MonadMPD m => Id -> FractionalSeconds -> m () seekId id' = A.runCommand . A.seekId id' +-- | Seek to some point in the current song. Absolute time for True in +-- the frist argument, relative time for False. +-- +-- @since 0.9.2.0 +seekCur :: MonadMPD m => Bool -> FractionalSeconds -> m () +seekCur bool = A.runCommand . A.seekCur bool + -- | Stop playing. stop :: MonadMPD m => m () stop = A.runCommand A.stop diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libmpd-0.9.1.0/src/Network/MPD/Commands/Query.hs new/libmpd-0.9.2.0/src/Network/MPD/Commands/Query.hs --- old/libmpd-0.9.1.0/src/Network/MPD/Commands/Query.hs 2019-09-27 18:56:33.000000000 +0200 +++ new/libmpd-0.9.2.0/src/Network/MPD/Commands/Query.hs 2020-10-02 11:28:29.000000000 +0200 @@ -1,5 +1,3 @@ -{-# LANGUAGE CPP #-} - {- | Module : Network.MPD.Commands.Query Copyright : (c) Joachim Fasting 2012 @@ -18,9 +16,7 @@ import Network.MPD.Commands.Types import Data.Monoid -#if MIN_VERSION_base(4,9,0) import Data.Semigroup -#endif -- | An interface for creating MPD queries. -- @@ -33,7 +29,7 @@ -- match any song where the value of artist is \"Foo\" and the value of album -- is \"Bar\", we use: -- --- > Artist =? "Foo" <&> Album =? "Bar" +-- > Artist =? "Foo" <> Album =? "Bar" newtype Query = Query [Match] deriving Show -- A single query clause, comprising a metadata key and a desired value. @@ -47,10 +43,8 @@ mempty = Query [] Query a `mappend` Query b = Query (a ++ b) -#if MIN_VERSION_base(4,9,0) instance Semigroup Query where (<>) = mappend -#endif instance MPDArg Query where prep = foldl (<++>) (Args []) . f @@ -68,3 +62,4 @@ infixr 6 <&> (<&>) :: Query -> Query -> Query (<&>) = mappend +{-# DEPRECATED (<&>) "will be removed in the next major version of libmpd, use `(<>)` instead" #-} diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libmpd-0.9.1.0/src/Network/MPD/Commands/Types.hs new/libmpd-0.9.2.0/src/Network/MPD/Commands/Types.hs --- old/libmpd-0.9.1.0/src/Network/MPD/Commands/Types.hs 2020-01-27 07:10:31.000000000 +0100 +++ new/libmpd-0.9.2.0/src/Network/MPD/Commands/Types.hs 2020-10-02 11:26:25.000000000 +0200 @@ -330,6 +330,7 @@ instance Integral Volume where quotRem (Volume x) (Volume y) = let (x', y') = x `quotRem` y in (Volume x', Volume y') + divMod = quotRem toInteger (Volume x) = fromIntegral x instance Real Volume where diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libmpd-0.9.1.0/src/Network/MPD/Core.hs new/libmpd-0.9.2.0/src/Network/MPD/Core.hs --- old/libmpd-0.9.1.0/src/Network/MPD/Core.hs 2020-01-27 06:46:46.000000000 +0100 +++ new/libmpd-0.9.2.0/src/Network/MPD/Core.hs 2020-10-02 11:26:25.000000000 +0200 @@ -1,4 +1,4 @@ -{-# LANGUAGE FlexibleContexts, GeneralizedNewtypeDeriving, OverloadedStrings, CPP #-} +{-# LANGUAGE FlexibleContexts, GeneralizedNewtypeDeriving, OverloadedStrings #-} {-# LANGUAGE ScopedTypeVariables #-} -- | Module : Network.MPD.Core
