return True#}}}
-def mconnect():
+def mconnect(host=None, port=None):#{{{
""""""
- ## get connection id
+ ## get connection id from ENV VAR
con_id, passwd = get_mpd_environ()
+ if host:
+ con_id.update({'host': host})
+ if port:
+ con_id.update({'port': port})
## MPD object instance
client = MPDClient()
if mpdConnect(client, con_id):
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__':