From: Florian Zeitz Date: Thu, 5 Jul 2012 19:53:50 +0000 (+0200) Subject: Fetch track information using comand lists X-Git-Url: https://cgit.babelmonkeys.de/?a=commitdiff_plain;h=78c398c0a23f734aa2e865c6832e1667dfe95929;p=mpdbot.git Fetch track information using comand lists --- diff --git a/src/PEPThread.m b/src/PEPThread.m index 91976ae..4daaefc 100644 --- a/src/PEPThread.m +++ b/src/PEPThread.m @@ -77,12 +77,15 @@ 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