X-Git-Url: http://git.kaliko.me/?p=mpd-goodies.git;a=blobdiff_plain;f=lib%2Fmpdutils.py;h=ea58b89c6b8f66a687f0d6f56b27e70ccbeb9a37;hp=a64d23908d0e5be0776200ee7a766597b7641c37;hb=86013a2622c1f21cc64ef81733d48023caaf75a9;hpb=ac614cfe6b06280840fdff358cad58d234732ebe diff --git a/lib/mpdutils.py b/lib/mpdutils.py index a64d239..ea58b89 100644 --- a/lib/mpdutils.py +++ b/lib/mpdutils.py @@ -73,7 +73,7 @@ def mpdAuth(client, secret):#{{{ return True#}}} -def mconnect(): +def mconnect():#{{{ """""" ## get connection id con_id, passwd = get_mpd_environ() @@ -95,7 +95,14 @@ def mconnect(): print 'ERROR: fail trying to pass auth. Check password?' client.disconnect() sys.exit(1) - return client + return client#}}} + +def collapse_tags(value): + if isinstance(value, list): + #self.__dict__[tag] = ", ".join(set(value)) + self.collapse_tags_bool = True + return ', '.join(set(value)) + return value#}}} # Script starts here if __name__ == '__main__':