]> git.babelmonkeys.de Git - mpdbot.git/commitdiff
Fetch track information using comand lists
authorFlorian Zeitz <florob@babelmonkeys.de>
Thu, 5 Jul 2012 19:53:50 +0000 (21:53 +0200)
committerFlorian Zeitz <florob@babelmonkeys.de>
Thu, 5 Jul 2012 19:53:50 +0000 (21:53 +0200)
src/PEPThread.m

index 91976aedac5af205e2b88a089283dc851de23cc2..4daaefc3636f2d86ba94fab416b1a55bba12e08d 100644 (file)
                        tune = [OFXMLElement elementWithName: @"tune"
                                                   namespace: NS_TUNE];
                        [item addChild: tune];
+
+                       [conn send: @"command_list_begin"];
                        [conn send: @"status"];
+                       [conn send: @"currentsong"];
+                       [conn send: @"command_list_end"];
                        response = [conn response];
+
                        if ([[response objectForKey: @"state"]
                            isEqual: @"play"]) {
-                               [conn send: @"currentsong"];
-                               response = [conn response];
                                if ((answer =
                                    [response objectForKey: @"Artist"]))
                                        [tune addChild: [OFXMLElement