import time from mpd import MPDClient client = MPDClient() client.timeout = 60 client.connect("localhost", 6600) title = "" station = "" while(True): info = client.currentsong() if station != info["name"]: station = info["name"] print(station) if title != info["title"]: title = info["title"] print(title) time.sleep(10)